IWorkbook.Calculate() Method
Forces recalculation of the workbook.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v20.2.Core.dll
Declaration
Remarks
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
TIP
You can create a custom calculation service implementing the ICustomCalculationService interface to change the way cells are calculated.
TIP
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.
NOTE
This method works only if the CalculationOptions.Mode setting is CalculationMode.Manual.