public final class XSSFFormulaEvaluator extends BaseXSSFFormulaEvaluator
BaseXSSFFormulaEvaluator.clearAllCachedResultValues()
if any workbook cells are changed between
calls to evaluate~ methods on this class.Modifier | Constructor and Description |
---|---|
|
XSSFFormulaEvaluator(XSSFWorkbook workbook) |
protected |
XSSFFormulaEvaluator(XSSFWorkbook workbook,
WorkbookEvaluator bookEvaluator) |
Modifier and Type | Method and Description |
---|---|
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
|
_getWorkbookEvaluator, clearAllCachedResultValues, doEvaluateInCell, evaluate, evaluateFormulaCell, notifyDeleteCell, notifySetFormula, notifyUpdateCell, setDebugEvaluationOutputForNextEval, setIgnoreMissingWorkbooks, setupReferencedWorkbooks
public XSSFFormulaEvaluator(XSSFWorkbook workbook)
protected XSSFFormulaEvaluator(XSSFWorkbook workbook, WorkbookEvaluator bookEvaluator)
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
Copyright 2016 The Apache Software Foundation or its licensors, as applicable.