org.apache.poi.ss.formula
Class WorkbookEvaluator

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

public 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 #clearCache() 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)
           
 
Method Summary
 void clearAllCachedResultValues()
          Should be called whenever there are changes to input cells in the evaluated workbook.
 void clearCachedResultValue(org.apache.poi.ss.usermodel.Sheet sheet, int rowIndex, int columnIndex)
           
 ValueEval evaluate(org.apache.poi.ss.usermodel.Cell srcCell)
           
 int getEvaluationCount()
          for debug/test use
 
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)
Method Detail

getEvaluationCount

public int getEvaluationCount()
for debug/test use


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


clearCachedResultValue

public void clearCachedResultValue(org.apache.poi.ss.usermodel.Sheet sheet,
                                   int rowIndex,
                                   int columnIndex)

evaluate

public ValueEval evaluate(org.apache.poi.ss.usermodel.Cell srcCell)


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