Setting Formula Calculation Mode of Workbook

Contents
[ ]

To set the formula calculation mode in Microsoft Excel:

  1. Select Formulas and then Calculation Options.
  2. Select one of the options.

Aspose.Cells also allows you to set the Formula Calculation Mode using FormulaSettings.CalculationMode mode property. You can assign it the CalcModeType enumeration which has one of the following values:

  • CalcModeType.Automatic
  • CalcModeType.AutomaticExceptTable
  • CalcModeType.Manual

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Create a workbook
Workbook workbook = new Workbook();
// Set the Formula Calculation Mode to Manual
workbook.Settings.FormulaSettings.CalculationMode = CalcModeType.Manual;
// Save the workbook
workbook.Save(dataDir + "output_out.xlsx", SaveFormat.Xlsx);