FormulaSettings

FormulaSettings class

Settings of formulas and calculation.

class FormulaSettings;

Properties

PropertyTypeDescription
calculateOnOpenbooleanIndicates whether the application is required to perform a full calculation when the workbook is opened.
calculateOnSavebooleanIndicates whether recalculate the workbook before saving the document, when in manual calculation mode.
forceFullCalculationbooleanIndicates whether calculates all formulas every time when a calculation is triggered.
calculationModeCalcModeTypeGets or sets the mode for workbook calculation in ms excel.
calculationIdstringSpecifies the version of the calculation engine used to calculate values in the workbook.
enableIterativeCalculationbooleanIndicates whether enable iterative calculation to resolve circular references.
maxIterationnumberThe maximum iterations to resolve a circular reference.
maxChangenumberThe maximum change to resolve a circular reference.
precisionAsDisplayedbooleanWhether the precision of calculated result be set as they are displayed while calculating formulas
enableCalculationChainbooleanWhether enable calculation chain for formulas. Default is false.
preservePaddingSpacesbooleanIndicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false.

Methods

MethodDescription
getCalculateOnOpen()@deprecated. Please use the ‘calculateOnOpen’ property instead. Indicates whether the application is required to perform a full calculation when the workbook is opened.
setCalculateOnOpen(boolean)@deprecated. Please use the ‘calculateOnOpen’ property instead. Indicates whether the application is required to perform a full calculation when the workbook is opened.
getCalculateOnSave()@deprecated. Please use the ‘calculateOnSave’ property instead. Indicates whether recalculate the workbook before saving the document, when in manual calculation mode.
setCalculateOnSave(boolean)@deprecated. Please use the ‘calculateOnSave’ property instead. Indicates whether recalculate the workbook before saving the document, when in manual calculation mode.
getForceFullCalculation()@deprecated. Please use the ‘forceFullCalculation’ property instead. Indicates whether calculates all formulas every time when a calculation is triggered.
setForceFullCalculation(boolean)@deprecated. Please use the ‘forceFullCalculation’ property instead. Indicates whether calculates all formulas every time when a calculation is triggered.
getCalculationMode()@deprecated. Please use the ‘calculationMode’ property instead. Gets or sets the mode for workbook calculation in ms excel.
setCalculationMode(CalcModeType)@deprecated. Please use the ‘calculationMode’ property instead. Gets or sets the mode for workbook calculation in ms excel.
getCalculationId()@deprecated. Please use the ‘calculationId’ property instead. Specifies the version of the calculation engine used to calculate values in the workbook.
setCalculationId(string)@deprecated. Please use the ‘calculationId’ property instead. Specifies the version of the calculation engine used to calculate values in the workbook.
getEnableIterativeCalculation()@deprecated. Please use the ’enableIterativeCalculation’ property instead. Indicates whether enable iterative calculation to resolve circular references.
setEnableIterativeCalculation(boolean)@deprecated. Please use the ’enableIterativeCalculation’ property instead. Indicates whether enable iterative calculation to resolve circular references.
getMaxIteration()@deprecated. Please use the ‘maxIteration’ property instead. The maximum iterations to resolve a circular reference.
setMaxIteration(number)@deprecated. Please use the ‘maxIteration’ property instead. The maximum iterations to resolve a circular reference.
getMaxChange()@deprecated. Please use the ‘maxChange’ property instead. The maximum change to resolve a circular reference.
setMaxChange(number)@deprecated. Please use the ‘maxChange’ property instead. The maximum change to resolve a circular reference.
getPrecisionAsDisplayed()@deprecated. Please use the ‘precisionAsDisplayed’ property instead. Whether the precision of calculated result be set as they are displayed while calculating formulas
setPrecisionAsDisplayed(boolean)@deprecated. Please use the ‘precisionAsDisplayed’ property instead. Whether the precision of calculated result be set as they are displayed while calculating formulas
getEnableCalculationChain()@deprecated. Please use the ’enableCalculationChain’ property instead. Whether enable calculation chain for formulas. Default is false.
setEnableCalculationChain(boolean)@deprecated. Please use the ’enableCalculationChain’ property instead. Whether enable calculation chain for formulas. Default is false.
getPreservePaddingSpaces()@deprecated. Please use the ‘preservePaddingSpaces’ property instead. Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false.
setPreservePaddingSpaces(boolean)@deprecated. Please use the ‘preservePaddingSpaces’ property instead. Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false.
isNull()Checks whether the implementation object is null.

calculateOnOpen

Indicates whether the application is required to perform a full calculation when the workbook is opened.

calculateOnOpen : boolean;

Remarks

This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading the resultant file. For performance consideration for most users’ applications, we do not calculate any formula in the workbook automatically, no matter what value has been set for this property.

calculateOnSave

Indicates whether recalculate the workbook before saving the document, when in manual calculation mode.

calculateOnSave : boolean;

Remarks

This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. For performance consideration for most users’ applications, we do not calculate any formula in the workbook automatically, no matter what value has been set for this property.

forceFullCalculation

Indicates whether calculates all formulas every time when a calculation is triggered.

forceFullCalculation : boolean;

Remarks

This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. For performance consideration for most users’ applications, we do not calculate any formula in the workbook automatically, no matter what value has been set for this property.

calculationMode

Gets or sets the mode for workbook calculation in ms excel.

calculationMode : CalcModeType;

Remarks

This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. For performance consideration for most user’s application, we do not calculate any formula in the workbook automatically, no matter what mode has been set for this property. If user needs to calculate formulas, please always call methods on different objects according to requirement: Workbook.CalculateFormula(), [Worksheet.CalculateFormula(CalculationOptions, bool)](../worksheet.calculateformula(calculationoptions, bool)/), Cell.Calculate(CalculationOptions), …etc.

calculationId

Specifies the version of the calculation engine used to calculate values in the workbook.

calculationId : string;

Remarks

This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. In the case of ms excel, if the value of this property is less than the recalculation engine identifier associated with the application that opens the resultant file, the application will recalculate the results of all formulas on this workbook immediately after loading the file. For performance consideration for most users’ applications, we do not calculate any formula on the workbook automatically, no matter what value has been set for this property.

enableIterativeCalculation

Indicates whether enable iterative calculation to resolve circular references.

enableIterativeCalculation : boolean;

maxIteration

The maximum iterations to resolve a circular reference.

maxIteration : number;

maxChange

The maximum change to resolve a circular reference.

maxChange : number;

precisionAsDisplayed

Whether the precision of calculated result be set as they are displayed while calculating formulas

precisionAsDisplayed : boolean;

enableCalculationChain

Whether enable calculation chain for formulas. Default is false.

enableCalculationChain : boolean;

Remarks

When there are lots of formulas in the workbook and user needs to calculate them repeatedly with modifying only a small part of them, it may be helpful for performance to enable the calculation chain. On the other hand, if the chain is enabled, maintaining the model of chain requires extra memory, and it also requires a bit more cpu time for some other operations such as changing cell’s value or formulas. After changing this property from false to true, the calculation chain will be analyzed and built at the time of first calculation for the workbook, so the required time for the first calculation may be more than normal calculation without chain.

preservePaddingSpaces

Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false.

preservePaddingSpaces : boolean;

Remarks

Generally those spaces and line breaks are jsut for visual purpose, Preserving them or not does not affect the calculated result. For performance consideration, if there is no special requirement, it is better not to preserve them while processing formulas.

getCalculateOnOpen()

@deprecated. Please use the ‘calculateOnOpen’ property instead. Indicates whether the application is required to perform a full calculation when the workbook is opened.

getCalculateOnOpen() : boolean;

Remarks

This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading the resultant file. For performance consideration for most users’ applications, we do not calculate any formula in the workbook automatically, no matter what value has been set for this property.

setCalculateOnOpen(boolean)

@deprecated. Please use the ‘calculateOnOpen’ property instead. Indicates whether the application is required to perform a full calculation when the workbook is opened.

setCalculateOnOpen(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading the resultant file. For performance consideration for most users’ applications, we do not calculate any formula in the workbook automatically, no matter what value has been set for this property.

getCalculateOnSave()

@deprecated. Please use the ‘calculateOnSave’ property instead. Indicates whether recalculate the workbook before saving the document, when in manual calculation mode.

getCalculateOnSave() : boolean;

Remarks

This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. For performance consideration for most users’ applications, we do not calculate any formula in the workbook automatically, no matter what value has been set for this property.

setCalculateOnSave(boolean)

@deprecated. Please use the ‘calculateOnSave’ property instead. Indicates whether recalculate the workbook before saving the document, when in manual calculation mode.

setCalculateOnSave(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. For performance consideration for most users’ applications, we do not calculate any formula in the workbook automatically, no matter what value has been set for this property.

getForceFullCalculation()

@deprecated. Please use the ‘forceFullCalculation’ property instead. Indicates whether calculates all formulas every time when a calculation is triggered.

getForceFullCalculation() : boolean;

Remarks

This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. For performance consideration for most users’ applications, we do not calculate any formula in the workbook automatically, no matter what value has been set for this property.

setForceFullCalculation(boolean)

@deprecated. Please use the ‘forceFullCalculation’ property instead. Indicates whether calculates all formulas every time when a calculation is triggered.

setForceFullCalculation(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. For performance consideration for most users’ applications, we do not calculate any formula in the workbook automatically, no matter what value has been set for this property.

getCalculationMode()

@deprecated. Please use the ‘calculationMode’ property instead. Gets or sets the mode for workbook calculation in ms excel.

getCalculationMode() : CalcModeType;

Returns

CalcModeType

Remarks

This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. For performance consideration for most user’s application, we do not calculate any formula in the workbook automatically, no matter what mode has been set for this property. If user needs to calculate formulas, please always call methods on different objects according to requirement: Workbook.CalculateFormula(), [Worksheet.CalculateFormula(CalculationOptions, bool)](../worksheet.calculateformula(calculationoptions, bool)/), Cell.Calculate(CalculationOptions), …etc.

setCalculationMode(CalcModeType)

@deprecated. Please use the ‘calculationMode’ property instead. Gets or sets the mode for workbook calculation in ms excel.

setCalculationMode(value: CalcModeType) : void;

Parameters:

ParameterTypeDescription
valueCalcModeTypeThe value to set.

Remarks

This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. For performance consideration for most user’s application, we do not calculate any formula in the workbook automatically, no matter what mode has been set for this property. If user needs to calculate formulas, please always call methods on different objects according to requirement: Workbook.CalculateFormula(), [Worksheet.CalculateFormula(CalculationOptions, bool)](../worksheet.calculateformula(calculationoptions, bool)/), Cell.Calculate(CalculationOptions), …etc.

getCalculationId()

@deprecated. Please use the ‘calculationId’ property instead. Specifies the version of the calculation engine used to calculate values in the workbook.

getCalculationId() : string;

Remarks

This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. In the case of ms excel, if the value of this property is less than the recalculation engine identifier associated with the application that opens the resultant file, the application will recalculate the results of all formulas on this workbook immediately after loading the file. For performance consideration for most users’ applications, we do not calculate any formula on the workbook automatically, no matter what value has been set for this property.

setCalculationId(string)

@deprecated. Please use the ‘calculationId’ property instead. Specifies the version of the calculation engine used to calculate values in the workbook.

setCalculationId(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

Remarks

This property is only for saving the settings to resultant spreadsheet file so that other applications(such as ms excel) may act accordingly when loading and manipulating the resultant file. In the case of ms excel, if the value of this property is less than the recalculation engine identifier associated with the application that opens the resultant file, the application will recalculate the results of all formulas on this workbook immediately after loading the file. For performance consideration for most users’ applications, we do not calculate any formula on the workbook automatically, no matter what value has been set for this property.

getEnableIterativeCalculation()

@deprecated. Please use the ’enableIterativeCalculation’ property instead. Indicates whether enable iterative calculation to resolve circular references.

getEnableIterativeCalculation() : boolean;

setEnableIterativeCalculation(boolean)

@deprecated. Please use the ’enableIterativeCalculation’ property instead. Indicates whether enable iterative calculation to resolve circular references.

setEnableIterativeCalculation(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getMaxIteration()

@deprecated. Please use the ‘maxIteration’ property instead. The maximum iterations to resolve a circular reference.

getMaxIteration() : number;

setMaxIteration(number)

@deprecated. Please use the ‘maxIteration’ property instead. The maximum iterations to resolve a circular reference.

setMaxIteration(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getMaxChange()

@deprecated. Please use the ‘maxChange’ property instead. The maximum change to resolve a circular reference.

getMaxChange() : number;

setMaxChange(number)

@deprecated. Please use the ‘maxChange’ property instead. The maximum change to resolve a circular reference.

setMaxChange(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getPrecisionAsDisplayed()

@deprecated. Please use the ‘precisionAsDisplayed’ property instead. Whether the precision of calculated result be set as they are displayed while calculating formulas

getPrecisionAsDisplayed() : boolean;

setPrecisionAsDisplayed(boolean)

@deprecated. Please use the ‘precisionAsDisplayed’ property instead. Whether the precision of calculated result be set as they are displayed while calculating formulas

setPrecisionAsDisplayed(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getEnableCalculationChain()

@deprecated. Please use the ’enableCalculationChain’ property instead. Whether enable calculation chain for formulas. Default is false.

getEnableCalculationChain() : boolean;

Remarks

When there are lots of formulas in the workbook and user needs to calculate them repeatedly with modifying only a small part of them, it may be helpful for performance to enable the calculation chain. On the other hand, if the chain is enabled, maintaining the model of chain requires extra memory, and it also requires a bit more cpu time for some other operations such as changing cell’s value or formulas. After changing this property from false to true, the calculation chain will be analyzed and built at the time of first calculation for the workbook, so the required time for the first calculation may be more than normal calculation without chain.

setEnableCalculationChain(boolean)

@deprecated. Please use the ’enableCalculationChain’ property instead. Whether enable calculation chain for formulas. Default is false.

setEnableCalculationChain(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

When there are lots of formulas in the workbook and user needs to calculate them repeatedly with modifying only a small part of them, it may be helpful for performance to enable the calculation chain. On the other hand, if the chain is enabled, maintaining the model of chain requires extra memory, and it also requires a bit more cpu time for some other operations such as changing cell’s value or formulas. After changing this property from false to true, the calculation chain will be analyzed and built at the time of first calculation for the workbook, so the required time for the first calculation may be more than normal calculation without chain.

getPreservePaddingSpaces()

@deprecated. Please use the ‘preservePaddingSpaces’ property instead. Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false.

getPreservePaddingSpaces() : boolean;

Remarks

Generally those spaces and line breaks are jsut for visual purpose, Preserving them or not does not affect the calculated result. For performance consideration, if there is no special requirement, it is better not to preserve them while processing formulas.

setPreservePaddingSpaces(boolean)

@deprecated. Please use the ‘preservePaddingSpaces’ property instead. Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false.

setPreservePaddingSpaces(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

Generally those spaces and line breaks are jsut for visual purpose, Preserving them or not does not affect the calculated result. For performance consideration, if there is no special requirement, it is better not to preserve them while processing formulas.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;