|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.xssf.usermodel.BaseXSSFFormulaEvaluator
org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator
public final class XSSFFormulaEvaluator
Evaluates formula cells.
For performance reasons, this class keeps a cache of all previously calculated intermediate cell values. Be sure to callBaseXSSFFormulaEvaluator.clearAllCachedResultValues()
if any workbook cells are changed between
calls to evaluate~ methods on this class.
Constructor Summary | |
---|---|
|
XSSFFormulaEvaluator(XSSFWorkbook workbook)
|
protected |
XSSFFormulaEvaluator(XSSFWorkbook workbook,
WorkbookEvaluator bookEvaluator)
|
Method Summary | |
---|---|
static XSSFFormulaEvaluator |
create(XSSFWorkbook workbook,
IStabilityClassifier stabilityClassifier,
UDFFinder udfFinder)
|
void |
evaluateAll()
Loops over all cells in all sheets of the supplied workbook. |
static void |
evaluateAllFormulaCells(XSSFWorkbook wb)
Loops over all cells in all sheets of the supplied workbook. |
XSSFCell |
evaluateInCell(Cell cell)
If cell contains formula, it evaluates the formula, and puts the formula result back into the cell, in place of the old formula. |
protected EvaluationCell |
toEvaluationCell(Cell cell)
Turns a XSSFCell into a XSSFEvaluationCell |
Methods inherited from class org.apache.poi.xssf.usermodel.BaseXSSFFormulaEvaluator |
---|
_getWorkbookEvaluator, clearAllCachedResultValues, doEvaluateInCell, evaluate, evaluateFormulaCell, notifyDeleteCell, notifySetFormula, notifyUpdateCell, setDebugEvaluationOutputForNextEval, setIgnoreMissingWorkbooks, setupReferencedWorkbooks |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XSSFFormulaEvaluator(XSSFWorkbook workbook)
protected XSSFFormulaEvaluator(XSSFWorkbook workbook, WorkbookEvaluator bookEvaluator)
Method Detail |
---|
public static XSSFFormulaEvaluator create(XSSFWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
stabilityClassifier
- used to optimise caching performance. Pass null
for the (conservative) assumption that any cell may have its definition changed after
evaluation begins.udfFinder
- pass null
for default (AnalysisToolPak only)public XSSFCell evaluateInCell(Cell cell)
int evaluatedCellType = evaluator.evaluateInCell(cell).getCellType();Be aware that your cell value will be changed to hold the result of the formula. If you simply want the formula value computed for you, use
BaseXSSFFormulaEvaluator.evaluateFormulaCell(org.apache.poi.ss.usermodel.Cell)
}
cell
- public static void evaluateAllFormulaCells(XSSFWorkbook wb)
public void evaluateAll()
protected EvaluationCell toEvaluationCell(Cell cell)
toEvaluationCell
in class BaseXSSFFormulaEvaluator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |