# ExcelCalculationOptions

Controls how formula cells are treated before a workbook is saved.

Class 

`OfficeIMO.Excel`

**Namespace**

`OfficeIMO.Excel`

**Assembly**

`OfficeIMO.Excel`

**Source revision**

`273d35d5ba8a` with working tree changes

**Source**

[ExcelCalculationOptions.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L26)

**Modifiers**

sealed

Controls how formula cells are treated before a workbook is saved.

## Inheritance

- object
- ExcelCalculationOptions

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Property [ExcelDocument.Calculation](/api/excel/officeimo-excel-exceldocument/#property-calculation)

Filter members 

Show inherited

## Constructors

`public ExcelCalculationOptions()` [#](#constructor-ctor)

[ExcelCalculationOptions.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L26)

## Methods

`public void ClearCustomFunctions()` [#](#method-clearcustomfunctions)

[ExcelCalculationOptions.cs:112](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L112)

Removes all custom formula functions registered for this workbook.

`public void RegisterCustomFunction(string name, ExcelCustomFormulaFunction function)` [#](#method-registercustomfunction-string-officeimo-excel-excelcustomformulafunction)

[ExcelCalculationOptions.cs:86](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L86)

Registers or replaces a custom formula function for this workbook.

Parameters

**name string required**

**function OfficeIMO.Excel.ExcelCustomFormulaFunction required**

`public bool RemoveCustomFunction(string name)` [#](#method-removecustomfunction-string)

[ExcelCalculationOptions.cs:102](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L102)

Removes a registered custom formula function.

Parameters

**name string required**

Returns

`bool`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public int MaximumDependencyDepth { get; set; }` [#](#property-maximumdependencydepth)

[ExcelCalculationOptions.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L37)

Gets or sets the maximum number of nested formula cells OfficeIMO evaluates in one dependency chain.

`public bool EvaluateFormulasBeforeSave { get; set; }` [#](#property-evaluateformulasbeforesave)

[ExcelCalculationOptions.cs:51](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L51)

When true, OfficeIMO evaluates supported formulas and writes cached values before saving. Unsupported formulas are left intact and can still be recalculated by Excel.

`public bool MarkFormulasDirtyBeforeSave { get; set; }` [#](#property-markformulasdirtybeforesave)

[ExcelCalculationOptions.cs:56](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L56)

When true, formula cells are marked dirty so Excel-compatible applications recalculate them on open.

`public bool ForceFullCalculationOnOpen { get; set; }` [#](#property-forcefullcalculationonopen)

[ExcelCalculationOptions.cs:61](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L61)

When true, workbook calculation properties request a full recalculation when the file opens.

`public bool ClearCachedFormulaResultsBeforeSave { get; set; }` [#](#property-clearcachedformularesultsbeforesave)

[ExcelCalculationOptions.cs:66](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L66)

When true, cached formula results are removed before saving. Ignored when [ExcelCalculationOptions.EvaluateFormulasBeforeSave](/api/excel/officeimo-excel-excelcalculationoptions/) is true.

`public IReadOnlyList<string> CustomFunctionNames { get; }` [#](#property-customfunctionnames)

[ExcelCalculationOptions.cs:73](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L73)

Gets the registered custom function names in ordinal order.

<!-- PowerForge markdown artifact sha256:DC640A0276A8AE56C12DF8A090915BDB62B0312415F6C67FC342A4243A13DDEF -->
