HSSFWorkbook or org.apache.poi.xssf.usermodel.XSSFWorkbook .
This class enables a 'master workbook' to be loaded just once and shared between many evaluation
clients. Each evaluation client creates its own ForkedEvaluator and can set cell values
that will be used for local evaluations (and don't disturb evaluations on other evaluators).
| Modifier and Type | Field and Description |
|---|---|
| private final WorkbookEvaluator | |
| private final ForkedEvaluationWorkbook |
| Access | Constructor and Description |
|---|---|
| private | ForkedEvaluator(EvaluationWorkbook masterWorkbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | copyUpdatedCells(Workbook workbook)
Copies the values of all updated cells (modified by calls to |
| public static ForkedEvaluator | create(Workbook wb, IStabilityClassifier stabilityClassifier, UDFFinder
pass udfFinder)null for default (AnalysisToolPak only)
|
| public ValueEval | Returns: null if the supplied cell is null or blankthe name of the sheet containing the cell sheetName, int zero based rowIndex, int zero based columnIndex)If cell contains a formula, the formula is evaluated and returned, else the CellValue simply copies the appropriate cell value from the cell and also its cell type. |
| public static void | setupEnvironment(String[]
the simple file names used to identify the workbooks in formulas
with external links (for example "MyData.xls" as used in a formula "[MyData.xls]Sheet1!A1") workbookNames, ForkedEvaluator[] all evaluators for the full set of workbooks required by the formulas. evaluators)Coordinates several formula evaluators together so that formulas that involve external references can be evaluated. |
| public void | updateCell(String
the name of the sheet containing the cell sheetName, int zero based rowIndex, int zero based columnIndex, ValueEval value)Sets the specified cell to the supplied |
| _evaluator | back to summary |
|---|---|
| private final WorkbookEvaluator _evaluator | |
| _sewb | back to summary |
|---|---|
| private final ForkedEvaluationWorkbook _sewb | |
| ForkedEvaluator | back to summary |
|---|---|
| private ForkedEvaluator(EvaluationWorkbook masterWorkbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder) | |
| copyUpdatedCells | back to summary |
|---|---|
| public void copyUpdatedCells(Workbook workbook) Copies the values of all updated cells (modified by calls to | |
| create | back to summary |
|---|---|
public static ForkedEvaluator create(Workbook wb, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder)
| |
| evaluate | back to summary |
|---|---|
| public ValueEval evaluate(String sheetName, int rowIndex, int columnIndex) If cell contains a formula, the formula is evaluated and returned, else the CellValue simply copies the appropriate cell value from the cell and also its cell type. This method should be preferred over evaluateInCell() when the call should not modify the contents of the original cell. | |
| setupEnvironment | back to summary |
|---|---|
| public static void setupEnvironment(String[] workbookNames, ForkedEvaluator[] evaluators) Coordinates several formula evaluators together so that formulas that involve external references can be evaluated.
| |
| updateCell | back to summary |
|---|---|
| public void updateCell(String sheetName, int rowIndex, int columnIndex, ValueEval value) Sets the specified cell to the supplied
| |