在使用 Node.js via C++ 时设置工作簿的公式计算模式

Contents
[ ]

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

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

Aspose.Cells for Node.js via C++ 还允许你使用 FormulaSettings.getCalculationMode() 模式属性设置 Formula Calculation Mode。可以为其赋值为具有以下值之一的 CalcModeType 枚举:

  • CalcModeType.Automatic
  • CalcModeType.AutomaticExceptTable
  • CalcModeType.Manual
const path = require("path");
const AsposeCells = require("aspose.cells.node");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
// Create a workbook
const workbook = new AsposeCells.Workbook();

// Set the Formula Calculation Mode to Manual
workbook.getSettings().getFormulaSettings().setCalculationMode(AsposeCells.CalcModeType.Manual);

// Save the workbook
workbook.save(path.join(dataDir, "output_out.xlsx"), AsposeCells.SaveFormat.Xlsx);