Setting Formula Calculation Mode of Workbook
Contents
[
Hide
]
Microsoft Excel allows you to set the formula calculation mode, that is, the way formulas are calculated. There are three possible values:
- Automatic - recalculate whenever something is changed, and every time a workbook is opened.
- Automatic except for data tables - recalculate whenever something is changed, but leaving out data tables.
- Manual - recalculate only when the user explicitly requests it by pressing F9 or CTRL+ALT+F9, or when the workbook is saved.
To set the formula calculation mode in Microsoft Excel:
- Select Formulas and then Calculation Options.
- Select one of the options.
Aspose.Cells also allows you to set the Formula Calculation Mode using the FormulaSettings.CalculationMode property. You can assign it the CalcModeType enumeration which has one of the following values:
The following sample code first creates a workbook, then it sets the formula calculation mode to Manual and saves the workbook as output Excel file on disk.
The output file. Note the formula calculation mode.