CalculationOptions

CalculationOptions class

Represents options for calculation.

class CalculationOptions;

Constructors

ConstructorDescription
constructor()Default Constructor.

Properties

PropertyTypeDescription
ignoreErrorbooleanIndicates whether errors encountered while calculating formulas should be ignored. The error may be unsupported function, external links, etc. The default value is true.
recursivebooleanIndicates whether calculate the dependent cells recursively when calculating one cell and it depends on other cells. The default value is true.
userSpecifiedRefreshDynamicArrayFormulabooleanReadonly. Indicates whether user has explicitly specified the behavior of refreshing dynamic array formulas before calculating specified formulas.
refreshDynamicArrayFormulabooleanIndicates whether dynamic array formulas should be refreshed before calculating formulas.
customEngineAbstractCalculationEngineThe custom formula calculation engine to extend the default calculation engine of Aspose.Cells.
calcStackSizenumberThe stack size for calculating cells recursively. Default value is 200.
precisionStrategyCalculationPrecisionStrategySpecifies the strategy for processing precision of calculation.
linkedDataSourcesWorkbook[]Specifies the data sources for external links used in formulas.
characterEncodingEncodingTypeSpecifies 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.

Methods

MethodDescription
getIgnoreError()@deprecated. Please use the ‘ignoreError’ property instead. 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)@deprecated. Please use the ‘ignoreError’ property instead. 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()@deprecated. Please use the ‘recursive’ property instead. Indicates whether calculate the dependent cells recursively when calculating one cell and it depends on other cells. The default value is true.
setRecursive(boolean)@deprecated. Please use the ‘recursive’ property instead. Indicates whether calculate the dependent cells recursively when calculating one cell and it depends on other cells. The default value is true.
getUserSpecifiedRefreshDynamicArrayFormula()@deprecated. Please use the ‘userSpecifiedRefreshDynamicArrayFormula’ property instead. Indicates whether user has explicitly specified the behavior of refreshing dynamic array formulas before calculating specified formulas.
getRefreshDynamicArrayFormula()@deprecated. Please use the ‘refreshDynamicArrayFormula’ property instead. Indicates whether dynamic array formulas should be refreshed before calculating formulas.
setRefreshDynamicArrayFormula(boolean)@deprecated. Please use the ‘refreshDynamicArrayFormula’ property instead. Indicates whether dynamic array formulas should be refreshed before calculating formulas.
getCustomEngine()@deprecated. Please use the ‘customEngine’ property instead. The custom formula calculation engine to extend the default calculation engine of Aspose.Cells.
setCustomEngine(AbstractCalculationEngine)@deprecated. Please use the ‘customEngine’ property instead. The custom formula calculation engine to extend the default calculation engine of Aspose.Cells.
getCalcStackSize()@deprecated. Please use the ‘calcStackSize’ property instead. The stack size for calculating cells recursively. Default value is 200.
setCalcStackSize(number)@deprecated. Please use the ‘calcStackSize’ property instead. The stack size for calculating cells recursively. Default value is 200.
getPrecisionStrategy()@deprecated. Please use the ‘precisionStrategy’ property instead. Specifies the strategy for processing precision of calculation.
setPrecisionStrategy(CalculationPrecisionStrategy)@deprecated. Please use the ‘precisionStrategy’ property instead. Specifies the strategy for processing precision of calculation.
getLinkedDataSources()@deprecated. Please use the ’linkedDataSources’ property instead. Specifies the data sources for external links used in formulas.
setLinkedDataSources(Workbook[])@deprecated. Please use the ’linkedDataSources’ property instead. Specifies the data sources for external links used in formulas.
getCharacterEncoding()@deprecated. Please use the ‘characterEncoding’ property instead. 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)@deprecated. Please use the ‘characterEncoding’ property instead. 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();

ignoreError

Indicates whether errors encountered while calculating formulas should be ignored. The error may be unsupported function, external links, etc. The default value is true.

ignoreError : boolean;

recursive

Indicates whether calculate the dependent cells recursively when calculating one cell and it depends on other cells. The default value is true.

recursive : boolean;

userSpecifiedRefreshDynamicArrayFormula

Readonly. Indicates whether user has explicitly specified the behavior of refreshing dynamic array formulas before calculating specified formulas.

userSpecifiedRefreshDynamicArrayFormula : boolean;

refreshDynamicArrayFormula

Indicates whether dynamic array formulas should be refreshed before calculating formulas.

refreshDynamicArrayFormula : boolean;

Remarks

If this property has been specified explicitly, then the specified value will be used to determine whether refresh dynamic array formulas. Otherwise(UserSpecifiedRefreshDynamicArrayFormula 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, bool)](../worksheet.calculateformula(calculationoptions, bool)/), this property will be taken as false.

customEngine

The custom formula calculation engine to extend the default calculation engine of Aspose.Cells.

customEngine : AbstractCalculationEngine;

calcStackSize

The stack size for calculating cells recursively. Default value is 200.

calcStackSize : 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.

precisionStrategy

Specifies the strategy for processing precision of calculation.

precisionStrategy : CalculationPrecisionStrategy;

linkedDataSources

Specifies the data sources for external links used in formulas.

linkedDataSources : 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.

characterEncoding

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.

characterEncoding : EncodingType;

getIgnoreError()

@deprecated. Please use the ‘ignoreError’ property instead. 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)

@deprecated. Please use the ‘ignoreError’ property instead. 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:

ParameterTypeDescription
valuebooleanThe value to set.

getRecursive()

@deprecated. Please use the ‘recursive’ property instead. 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)

@deprecated. Please use the ‘recursive’ property instead. 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:

ParameterTypeDescription
valuebooleanThe value to set.

getUserSpecifiedRefreshDynamicArrayFormula()

@deprecated. Please use the ‘userSpecifiedRefreshDynamicArrayFormula’ property instead. Indicates whether user has explicitly specified the behavior of refreshing dynamic array formulas before calculating specified formulas.

getUserSpecifiedRefreshDynamicArrayFormula() : boolean;

getRefreshDynamicArrayFormula()

@deprecated. Please use the ‘refreshDynamicArrayFormula’ property instead. Indicates whether dynamic array formulas should be refreshed before calculating formulas.

getRefreshDynamicArrayFormula() : boolean;

Remarks

If this property has been specified explicitly, then the specified value will be used to determine whether refresh dynamic array formulas. Otherwise(UserSpecifiedRefreshDynamicArrayFormula 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, bool)](../worksheet.calculateformula(calculationoptions, bool)/), this property will be taken as false.

setRefreshDynamicArrayFormula(boolean)

@deprecated. Please use the ‘refreshDynamicArrayFormula’ property instead. Indicates whether dynamic array formulas should be refreshed before calculating formulas.

setRefreshDynamicArrayFormula(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

If this property has been specified explicitly, then the specified value will be used to determine whether refresh dynamic array formulas. Otherwise(UserSpecifiedRefreshDynamicArrayFormula 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, bool)](../worksheet.calculateformula(calculationoptions, bool)/), this property will be taken as false.

getCustomEngine()

@deprecated. Please use the ‘customEngine’ property instead. The custom formula calculation engine to extend the default calculation engine of Aspose.Cells.

getCustomEngine() : AbstractCalculationEngine;

Returns

AbstractCalculationEngine

setCustomEngine(AbstractCalculationEngine)

@deprecated. Please use the ‘customEngine’ property instead. The custom formula calculation engine to extend the default calculation engine of Aspose.Cells.

setCustomEngine(value: AbstractCalculationEngine) : void;

Parameters:

ParameterTypeDescription
valueAbstractCalculationEngineThe value to set.

getCalcStackSize()

@deprecated. Please use the ‘calcStackSize’ property instead. 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)

@deprecated. Please use the ‘calcStackSize’ property instead. The stack size for calculating cells recursively. Default value is 200.

setCalcStackSize(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe 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()

@deprecated. Please use the ‘precisionStrategy’ property instead. Specifies the strategy for processing precision of calculation.

getPrecisionStrategy() : CalculationPrecisionStrategy;

Returns

CalculationPrecisionStrategy

setPrecisionStrategy(CalculationPrecisionStrategy)

@deprecated. Please use the ‘precisionStrategy’ property instead. Specifies the strategy for processing precision of calculation.

setPrecisionStrategy(value: CalculationPrecisionStrategy) : void;

Parameters:

ParameterTypeDescription
valueCalculationPrecisionStrategyThe value to set.

getLinkedDataSources()

@deprecated. Please use the ’linkedDataSources’ property instead. 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[])

@deprecated. Please use the ’linkedDataSources’ property instead. Specifies the data sources for external links used in formulas.

setLinkedDataSources(value: Workbook[]) : void;

Parameters:

ParameterTypeDescription
valueWorkbook[]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()

@deprecated. Please use the ‘characterEncoding’ property instead. 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

EncodingType

setCharacterEncoding(EncodingType)

@deprecated. Please use the ‘characterEncoding’ property instead. 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:

ParameterTypeDescription
valueEncodingTypeThe value to set.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;