CalculationOptions
CalculationOptions class
Represents options for calculation.
class CalculationOptions;
Constructors
Name | Description |
---|---|
constructor() | Default Constructor. |
Methods
Method | Description |
---|---|
getIgnoreError() | Indicates whether errors encountered while calculating formulas should be ignored. The error may be unsupported function, external links, etc. The default value is true. |
setIgnoreError(boolean) | Indicates whether errors encountered while calculating formulas should be ignored. The error may be unsupported function, external links, etc. The default value is true. |
getRecursive() | Indicates whether calculate the dependent cells recursively when calculating one cell and it depends on other cells. The default value is true. |
setRecursive(boolean) | Indicates whether calculate the dependent cells recursively when calculating one cell and it depends on other cells. The default value is true. |
getCustomEngine() | The custom formula calculation engine to extend the default calculation engine of Aspose.Cells. |
setCustomEngine(AbstractCalculationEngine) | The custom formula calculation engine to extend the default calculation engine of Aspose.Cells. |
getCalcStackSize() | The stack size for calculating cells recursively. Default value is 200. |
setCalcStackSize(number) | The stack size for calculating cells recursively. Default value is 200. |
getPrecisionStrategy() | Specifies the strategy for processing precision of calculation. |
setPrecisionStrategy(CalculationPrecisionStrategy) | Specifies the strategy for processing precision of calculation. |
getLinkedDataSources() | Specifies the data sources for external links used in formulas. |
setLinkedDataSources(Workbook[]) | Specifies the data sources for external links used in formulas. |
getCharacterEncoding() | Specifies the encoding used for encoding/decoding characters when calculating formulas. For functions such as CHAR, CODE, the calculated result depends on the region settings and default charset of the environment. With this property user can specify the proper encoding used for those function to get the expected result. |
setCharacterEncoding(EncodingType) | Specifies the encoding used for encoding/decoding characters when calculating formulas. For functions such as CHAR, CODE, the calculated result depends on the region settings and default charset of the environment. With this property user can specify the proper encoding used for those function to get the expected result. |
isNull() | Checks whether the implementation object is null. |
constructor()
Default Constructor.
constructor();
getIgnoreError()
Indicates whether errors encountered while calculating formulas should be ignored. The error may be unsupported function, external links, etc. The default value is true.
getIgnoreError() : boolean;
setIgnoreError(boolean)
Indicates whether errors encountered while calculating formulas should be ignored. The error may be unsupported function, external links, etc. The default value is true.
setIgnoreError(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getRecursive()
Indicates whether calculate the dependent cells recursively when calculating one cell and it depends on other cells. The default value is true.
getRecursive() : boolean;
setRecursive(boolean)
Indicates whether calculate the dependent cells recursively when calculating one cell and it depends on other cells. The default value is true.
setRecursive(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getCustomEngine()
The custom formula calculation engine to extend the default calculation engine of Aspose.Cells.
getCustomEngine() : AbstractCalculationEngine;
Returns
setCustomEngine(AbstractCalculationEngine)
The custom formula calculation engine to extend the default calculation engine of Aspose.Cells.
setCustomEngine(value: AbstractCalculationEngine) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | AbstractCalculationEngine | The value to set. |
getCalcStackSize()
The stack size for calculating cells recursively. Default value is 200.
getCalcStackSize() : number;
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.
setCalcStackSize(number)
The stack size for calculating cells recursively. Default value is 200.
setCalcStackSize(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
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.
getPrecisionStrategy()
Specifies the strategy for processing precision of calculation.
getPrecisionStrategy() : CalculationPrecisionStrategy;
Returns
setPrecisionStrategy(CalculationPrecisionStrategy)
Specifies the strategy for processing precision of calculation.
setPrecisionStrategy(value: CalculationPrecisionStrategy) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | CalculationPrecisionStrategy | The value to set. |
getLinkedDataSources()
Specifies the data sources for external links used in formulas.
getLinkedDataSources() : Workbook[];
Returns
Workbook[]
Remarks
Like Workbook.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.FileName and ExternalLink.DataSource. So please make sure Workbook.FileName has been specified with the proper value(generally it should be same with corresponding ExternalLink.DataSource) for every workbook so they can be linked as expected.
setLinkedDataSources(Workbook[])
Specifies the data sources for external links used in formulas.
setLinkedDataSources(value: Workbook[]) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | Workbook[] | The value to set. |
Remarks
Like Workbook.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.FileName and ExternalLink.DataSource. So please make sure Workbook.FileName has been specified with the proper value(generally it should be same with corresponding ExternalLink.DataSource) for every workbook so they can be linked as expected.
getCharacterEncoding()
Specifies the encoding used for encoding/decoding characters when calculating formulas. For functions such as CHAR, CODE, the calculated result depends on the region settings and default charset of the environment. With this property user can specify the proper encoding used for those function to get the expected result.
getCharacterEncoding() : EncodingType;
Returns
setCharacterEncoding(EncodingType)
Specifies the encoding used for encoding/decoding characters when calculating formulas. For functions such as CHAR, CODE, the calculated result depends on the region settings and default charset of the environment. With this property user can specify the proper encoding used for those function to get the expected result.
setCharacterEncoding(value: EncodingType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | EncodingType | The value to set. |
isNull()
Checks whether the implementation object is null.
isNull() : boolean;