org.apache.poi.ss.formula
Class WorkbookEvaluator

java.lang.Object
  extended by org.apache.poi.ss.formula.WorkbookEvaluator

public final class WorkbookEvaluator
extends java.lang.Object

Evaluates formula cells.

For performance reasons, this class keeps a cache of all previously calculated intermediate cell values. Be sure to call clearAllCachedResultValues() if any workbook cells are changed between calls to evaluate~ methods on this class.
For POI internal use only

Author:
Josh Micich

Constructor Summary
WorkbookEvaluator(EvaluationWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
           
 
Method Summary
 void clearAllCachedResultValues()
          Should be called whenever there are changes to input cells in the evaluated workbook.
 ValueEval evaluate(EvaluationCell srcCell)
           
 FreeRefFunction findUserDefinedFunction(java.lang.String functionName)
           
 void notifyDeleteCell(EvaluationCell cell)
          Should be called to tell the cell value cache that the specified cell has just been deleted.
 void notifyUpdateCell(EvaluationCell cell)
          Should be called to tell the cell value cache that the specified (value or formula) cell has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkbookEvaluator

public WorkbookEvaluator(EvaluationWorkbook workbook,
                         IStabilityClassifier stabilityClassifier,
                         UDFFinder udfFinder)
Parameters:
udfFinder - pass null for default (AnalysisToolPak only)
Method Detail

clearAllCachedResultValues

public void clearAllCachedResultValues()
Should be called whenever there are changes to input cells in the evaluated workbook. Failure to call this method after changing cell values will cause incorrect behaviour of the evaluate~ methods of this class


notifyUpdateCell

public void notifyUpdateCell(EvaluationCell cell)
Should be called to tell the cell value cache that the specified (value or formula) cell has changed.


notifyDeleteCell

public void notifyDeleteCell(EvaluationCell cell)
Should be called to tell the cell value cache that the specified cell has just been deleted.


evaluate

public ValueEval evaluate(EvaluationCell srcCell)

findUserDefinedFunction

public FreeRefFunction findUserDefinedFunction(java.lang.String functionName)


Copyright 2012 The Apache Software Foundation or its licensors, as applicable.