Skip to content

Class ExcelCalculationOption

Namespace: OfficeOpenXml.FormulaParsing
Assembly: EPPlus.dll

Options used by the formula parser

public class ExcelCalculationOption

Inheritance

object ← ExcelCalculationOption

Inherited Members

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

Constructors

ExcelCalculationOption()

Constructor

public ExcelCalculationOption()

Properties

AllowCircularReferences

Do not throw an exception if the formula parser encounters a circular reference

public bool AllowCircularReferences { get; set; }

Property Value

bool

AlwaysRefreshImageFunction

If true, EPPlus will download the images in the IMAGE function even if they exists in the package. The same URL will only be downloaded once. If false(default), EPPlus will only download images that doesn't exist in the package.

public bool AlwaysRefreshImageFunction { get; set; }

Property Value

bool

CacheExpressions

Expressions in the formula calculation will be cached, to be reduced. This increases speed, if having multiple formulas using the same expressions. Caching increases memory consumption on calculate.

public bool CacheExpressions { get; set; }

Property Value

bool

CancellationToken

A cancellation token that can be used to cancel a running calculation. When cancelled, an OperationCanceledException will be thrown and the workbook will be left in an inconsistent, partially calculated state. The workbook must be discarded after cancellation — saving or recalculating a cancelled workbook is not permitted.

public CancellationToken CancellationToken { get; set; }

Property Value

CancellationToken

Examples

using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30));
workbook.Calculate(opt => opt.CancellationToken = cts.Token);

EnableUnicodeAwareStringOperations

Enables Unicode-aware string operations, ensuring correct handling of surrogate pairs for comparisons, substrings, and sorting within the library.

public bool EnableUnicodeAwareStringOperations { get; set; }

Property Value

bool

FollowDependencyChain

If true, EPPlus will calculate the cells in order calculating any dependent cells. Default. If false, EPPlus will calculate the cells without calculating dependent cells.

public bool FollowDependencyChain { get; set; }

Property Value

bool

PrecisionAndRoundingStrategy

In some functions EPPlus will round double values to 15 significant figures before the value is handled. This is an option for Excel compatibility.

public PrecisionAndRoundingStrategy PrecisionAndRoundingStrategy { get; set; }

Property Value

PrecisionAndRoundingStrategy