ワークブックの式の計算モードを設定する

Contents
[ ]

Microsoft Excelでの式計算モードを設定するには:

  1. 、次に計算オプションを選択します。 1つのオプションを選択します。

Aspose.Cellsでは、FormulaSettings.CalculationMode プロパティを使用して式計算モードを設定できます。それにはCalcModeType 列挙型を代入でき、次のいずれかの値を持ちます:

以下のサンプルコードはまずワークブックを作成し、次に式計算モードをマニュアルに設定し、ワークブックをディスク上の出力Excelファイルとして保存します。

出力ファイル。式計算モードに注意してください。

todo:image_alt_text

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
// The path to the documents directory.
String dataDir = Utils.getDataDir(SetFormulaCalculationMode.class);
// Create a workbook
Workbook workbook = new Workbook();
// Set the Formula Calculation Mode to Manual
workbook.getSettings().getFormulaSettings().setCalculationMode(CalcModeType.MANUAL);
// Save the workbook
workbook.save("output.xlsx", SaveFormat.XLSX);