public class CalculationOptions
extends java.lang.Object
| Constructor and Description |
|---|
CalculationOptions() |
| Modifier and Type | Method and Description |
|---|---|
int |
getCalcStackSize()
The stack size for calculating cells recursively.
|
AbstractCalculationMonitor |
getCalculationMonitor()
The monitor for user to track the progress of formula calculation.
|
Encoding |
getCharacterEncoding()
Specifies the encoding used for encoding/decoding characters when calculating formulas.
|
AbstractCalculationEngine |
getCustomEngine()
The custom formula calculation engine to extend the default calculation engine of Aspose.Cells.
|
boolean |
getIgnoreError()
Indicates whether errors encountered while calculating formulas should be ignored.
|
Workbook[] |
getLinkedDataSources()
Specifies the data sources for external links used in formulas.
|
int |
getPrecisionStrategy()
Specifies the strategy for processing precision of calculation.
|
boolean |
getRecursive()
Indicates whether calculate the dependent cells recursively when calculating one cell and it depends on other cells.
|
boolean |
getRefreshDynamicArrayFormula()
Indicates whether dynamic array formulas should be refreshed
before calculating formulas.
|
boolean |
getUserSpecifiedRefreshDynamicArrayFormula()
Indicates whether user has explicitly specified the behavior of
refreshing dynamic array formulas before calculating specified formulas.
|
void |
setCalcStackSize(int value)
The stack size for calculating cells recursively.
|
void |
setCalculationMonitor(AbstractCalculationMonitor value)
The monitor for user to track the progress of formula calculation.
|
void |
setCharacterEncoding(Encoding value)
Specifies the encoding used for encoding/decoding characters when calculating formulas.
|
void |
setCustomEngine(AbstractCalculationEngine value)
The custom formula calculation engine to extend the default calculation engine of Aspose.Cells.
|
void |
setIgnoreError(boolean value)
Indicates whether errors encountered while calculating formulas should be ignored.
|
void |
setLinkedDataSources(Workbook[] value)
Specifies the data sources for external links used in formulas.
|
void |
setPrecisionStrategy(int value)
Specifies the strategy for processing precision of calculation.
|
void |
setRecursive(boolean value)
Indicates whether calculate the dependent cells recursively when calculating one cell and it depends on other cells.
|
void |
setRefreshDynamicArrayFormula(boolean value)
Indicates whether dynamic array formulas should be refreshed
before calculating formulas.
|
public boolean getIgnoreError()
public void setIgnoreError(boolean value)
public boolean getRecursive()
public void setRecursive(boolean value)
public boolean getUserSpecifiedRefreshDynamicArrayFormula()
public boolean getRefreshDynamicArrayFormula()
Remarks
If this property has been specified explicitly, then the specified value will be used to determine whether refresh dynamic array formulas. Otherwise(getUserSpecifiedRefreshDynamicArrayFormula() is flase),
the default value of it depends on what kind of formulas need to be calculated:
For calculating formulas for the workbook,
such as Workbook.calculateFormula(CalculationOptions),
this property will be taken as true.
For other cases, such as Cell.calculate(CalculationOptions)
or Worksheet.calculateFormula(CalculationOptions,boolean),
this property will be taken as false.public void setRefreshDynamicArrayFormula(boolean value)
Remarks
If this property has been specified explicitly, then the specified value will be used to determine whether refresh dynamic array formulas. Otherwise(getUserSpecifiedRefreshDynamicArrayFormula() is flase),
the default value of it depends on what kind of formulas need to be calculated:
For calculating formulas for the workbook,
such as Workbook.calculateFormula(CalculationOptions),
this property will be taken as true.
For other cases, such as Cell.calculate(CalculationOptions)
or Worksheet.calculateFormula(CalculationOptions,boolean),
this property will be taken as false.public AbstractCalculationEngine getCustomEngine()
public void setCustomEngine(AbstractCalculationEngine value)
public AbstractCalculationMonitor getCalculationMonitor()
public void setCalculationMonitor(AbstractCalculationMonitor value)
public int getCalcStackSize()
Remarks
When there are large amount of cells need to be calculated recursively in the dependency tree, StackOverflowException may be caused in the calculation process. If so, user should specify smaller value for this property. For such situation, user should determine the proper value for this property according to the actual formulas and data. However, too small value may cause performance degradation for the formula calculation and value less than 2 will make it impossible to calculate formula which depends on another one. So if the specified value is less than 2, it will be reset to 2.public void setCalcStackSize(int value)
Remarks
When there are large amount of cells need to be calculated recursively in the dependency tree, StackOverflowException may be caused in the calculation process. If so, user should specify smaller value for this property. For such situation, user should determine the proper value for this property according to the actual formulas and data. However, too small value may cause performance degradation for the formula calculation and value less than 2 will make it impossible to calculate formula which depends on another one. So if the specified value is less than 2, it will be reset to 2.public int getPrecisionStrategy()
public void setPrecisionStrategy(int value)
public Workbook[] getLinkedDataSources()
Remarks
LikeWorkbook.updateLinkedDataSource(Workbook[]), here you may specify
data sources for external links used in formulas to be calculated, especially those
used in INDIRECT function. For those external links used in INDIRECT function,
they are not taken as part of the external links of the workbook and cannot be updated
by Workbook.updateLinkedDataSource(Workbook[]).
The match of those workbooks with external links is determined by Workbook.getFileName()
and ExternalLink.getDataSource(). So please make sure Workbook.getFileName() has
been specified with the proper value(generally it should be same with corresponding
ExternalLink.getDataSource()) for every workbook so they can be linked as expected.public void setLinkedDataSources(Workbook[] value)
Remarks
LikeWorkbook.updateLinkedDataSource(Workbook[]), here you may specify
data sources for external links used in formulas to be calculated, especially those
used in INDIRECT function. For those external links used in INDIRECT function,
they are not taken as part of the external links of the workbook and cannot be updated
by Workbook.updateLinkedDataSource(Workbook[]).
The match of those workbooks with external links is determined by Workbook.getFileName()
and ExternalLink.getDataSource(). So please make sure Workbook.getFileName() has
been specified with the proper value(generally it should be same with corresponding
ExternalLink.getDataSource()) for every workbook so they can be linked as expected.public Encoding getCharacterEncoding()
public void setCharacterEncoding(Encoding value)
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.