Forces recalculation of the workbook.
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.