Class CalculationOptions

Class CalculationOptions

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

Represents options for calculation.

public class CalculationOptions

Inheritance

objectCalculationOptions

Inherited Members

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

Constructors

CalculationOptions()

public CalculationOptions()

Properties

CalcStackSize

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

public int CalcStackSize { get; set; }

Property Value

int

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.

CalculationMonitor

The monitor for user to track the progress of formula calculation.

public AbstractCalculationMonitor CalculationMonitor { get; set; }

Property Value

AbstractCalculationMonitor

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.

public Encoding CharacterEncoding { get; set; }

Property Value

Encoding

CustomEngine

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

public AbstractCalculationEngine CustomEngine { get; set; }

Property Value

AbstractCalculationEngine

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.

public bool IgnoreError { get; set; }

Property Value

bool

LinkedDataSources

Specifies the data sources for external links used in formulas.

public Workbook[] LinkedDataSources { get; set; }

Property Value

Workbook[]

Remarks

Like Aspose.Cells.Workbook.UpdateLinkedDataSource(Aspose.Cells.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 Aspose.Cells.Workbook.UpdateLinkedDataSource(Aspose.Cells.Workbook[]). The match of those workbooks with external links is determined by Aspose.Cells.Workbook.FileName and Aspose.Cells.ExternalLink.DataSource. So please make sure Aspose.Cells.Workbook.FileName has been specified with the proper value(generally it should be same with corresponding Aspose.Cells.ExternalLink.DataSource) for every workbook so they can be linked as expected.

PrecisionStrategy

Specifies the strategy for processing precision of calculation.

public CalculationPrecisionStrategy PrecisionStrategy { get; set; }

Property Value

CalculationPrecisionStrategy

Recursive

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

public bool Recursive { get; set; }

Property Value

bool