设置工作簿的公式计算模式

Contents
[ ]

在Microsoft Excel中设置公式计算模式:

  1. 选择公式然后计算选项
  2. 选择其中一个选项。

Aspose.Cells还允许使用FormulaSettings.CalculationMode 模式属性设置公式计算模式。您可以将其分配给CalcModeType 枚举,该枚举具有以下值之一:

  • 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);