public final class SXSSFFormulaEvaluator extends BaseXSSFFormulaEvaluator
Modifier and Type | Class and Description |
---|---|
static class |
SXSSFFormulaEvaluator.RowFlushedException |
static class |
SXSSFFormulaEvaluator.SheetsFlushedException |
_bookEvaluator
Constructor and Description |
---|
SXSSFFormulaEvaluator(SXSSFWorkbook workbook) |
Modifier and Type | Method and Description |
---|---|
static SXSSFFormulaEvaluator |
create(SXSSFWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder) |
void |
evaluateAll()
Loops over rows and cells, evaluating formula cells there.
(循环遍历行和单元格,在那里评估公式单元格。)
|
static void |
evaluateAllFormulaCells(SXSSFWorkbook wb, boolean skipOutOfWindow)
For active worksheets only, will loop over rows and cells, evaluating formula cells there.
(仅对于活动工作表,将遍历行和单元格,在那里评估公式单元格。)
|
SXSSFCell |
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.
(如果单元格包含公式,它会计算公式,并将公式结果放回单元格中,以代替旧公式。)
|
void |
notifyDeleteCell(Cell cell)
Should be called to tell the cell value cache that the specified cell has just become a formula cell, or the formula text has changed
(应该调用来告诉单元格值缓存指定单元格刚刚变成了公式单元格,或者公式文本发生了变化)
|
void |
notifySetFormula(Cell cell)
Should be called to tell the cell value cache that the specified (value or formula) cell has changed.
(应该调用以告诉单元格值缓存指定的(值或公式)单元格已更改。)
|
void |
notifyUpdateCell(Cell cell)
Should be called to tell the cell value cache that the specified (value or formula) cell has changed.
(应该调用以告诉单元格值缓存指定的(值或公式)单元格已更改。)
|
protected EvaluationCell |
toEvaluationCell(Cell cell)
Turns a SXSSFCell into a SXSSFEvaluationCell
(将 SXSSFCell 变成 SXSSFEvaluationCell)
|
createRichTextString, evaluateFormulaCellValue, setCellType
_getWorkbookEvaluator, clearAllCachedResultValues, evaluate, evaluateAllFormulaCells, evaluateAllFormulaCells, evaluateFormulaCell, getEvaluationWorkbook, setCellType, setCellValue, setDebugEvaluationOutputForNextEval, setIgnoreMissingWorkbooks, setupEnvironment, setupReferencedWorkbooks
public SXSSFFormulaEvaluator(SXSSFWorkbook workbook)
public static SXSSFFormulaEvaluator create(SXSSFWorkbook 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.
(stableClassifier - 用于优化缓存性能。为(保守的)假设传递 null ,即任何单元格在评估开始后可能会更改其定义。)
udfFinder
- pass
null
for default (AnalysisToolPak only)
(udfFinder - 传递 null 为默认值(仅限AnalysisToolPak))
public void notifySetFormula(Cell cell)
FormulaEvaluator
public void notifyDeleteCell(Cell cell)
FormulaEvaluator
public void notifyUpdateCell(Cell cell)
FormulaEvaluator
protected EvaluationCell toEvaluationCell(Cell cell)
toEvaluationCell
in class
BaseXSSFFormulaEvaluator
(类 BaseXSSFFormulaEvaluator 中的 toEvaluationCell)
public SXSSFCell evaluateInCell(Cell cell)
BaseFormulaEvaluator
Cell
is returned to allow chained calls like:
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
BaseFormulaEvaluator.evaluateFormulaCell(Cell)
}
(如果单元格包含公式,它会计算公式,并将公式结果放回单元格中,以代替旧公式。否则,如果单元格不包含公式,则此方法使单元格保持不变。请注意,返回相同的 Cell 实例以允许链式调用,例如: int evaluateCellType = evaluator.evaluateInCell(cell).getCellType();请注意,您的单元格值将更改为保存公式的结果。如果您只想为您计算公式值,请使用 BaseFormulaEvaluator.evaluateFormulaCell(Cell)})
evaluateInCell
in interface
FormulaEvaluator
(接口 FormulaEvaluator 中的 evaluateInCell)
evaluateInCell
in class
BaseFormulaEvaluator
cell
- The
Cell
to evaluate and modify.
(cell - 要评估和修改的 Cell。)
cell
that was passed in, allowing for chained calls
(传入的单元格,允许链式调用)
public static void evaluateAllFormulaCells(SXSSFWorkbook wb, boolean skipOutOfWindow)
public void evaluateAll()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.