Class FormulaSettings

Class FormulaSettings

Namespace: Aspose.Cells
Assembly: Aspose.Cells.dll (25.2.0)

Settings of formulas and calculation.

public class FormulaSettings

Inheritance

objectFormulaSettings

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Properties

CalculateOnOpen

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

public bool CalculateOnOpen { get; set; }

Property Value

bool

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.

public bool CalculateOnSave { get; set; }

Property Value

bool

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.

CalculationId

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

public string CalculationId { get; set; }

Property Value

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.

CalculationMode

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

public CalcModeType CalculationMode { get; set; }

Property Value

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: Aspose.Cells.Workbook.CalculateFormula, Aspose.Cells.Worksheet.CalculateFormula(Aspose.Cells.CalculationOptions,System.Boolean), Aspose.Cells.Cell.Calculate(Aspose.Cells.CalculationOptions), …etc.

EnableCalculationChain

Whether enable calculation chain for formulas. Default is false.

public bool EnableCalculationChain { get; set; }

Property Value

bool

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.

EnableIterativeCalculation

Indicates whether enable iterative calculation to resolve circular references.

public bool EnableIterativeCalculation { get; set; }

Property Value

bool

ForceFullCalculation

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

public bool ForceFullCalculation { get; set; }

Property Value

bool

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.

MaxChange

The maximum change to resolve a circular reference.

public double MaxChange { get; set; }

Property Value

double

MaxIteration

The maximum iterations to resolve a circular reference.

public int MaxIteration { get; set; }

Property Value

int

PrecisionAsDisplayed

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

public bool PrecisionAsDisplayed { get; set; }

Property Value

bool

PreservePaddingSpaces

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

public bool PreservePaddingSpaces { get; set; }

Property Value

bool

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.