.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

IWorkbook.Calculate() Method

Forces recalculation of the workbook.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v20.2.Core.dll


void Calculate()
Sub Calculate


The Calculate recalculates values in cells marked for calculation. The cell is marked for calculation by the Spreadsheet control if any change is made to its formula, or when a cell range, referenced in the formula, changes.

There are also "CalculateAlways" cells which are always marked as needing recalculation. The Calculate method calculates them as well. "CalculateAlways" cell is the cell for which any of the following statements is true:

  • the cell contains a volatile function (IFunction.Volatile)
  • the cell references another "CalculateAlways" cell
  • the cell contains a circular reference

You can create a custom calculation service implementing the ICustomCalculationService interface to change the way cells are calculated.


When the Calculate is called, all workbook modifications are applied and all cells are calculated. Recalculation of the entire workbook can take a significant amount of time and resources. To calculate only a formula contained in a single cell, use the IWorkbook.Evaluate method.


This method works only if the CalculationOptions.Mode setting is CalculationMode.Manual.

See Also