使用 Node.js 通过 C++ 实现 1904 日期系统

Contents
[ ]

在Microsoft Excel中实现1904日期系统(例如,Microsoft Excel 2003)的方法:

  1. 从“工具”菜单中选择“选项”,并选择“计算”选项卡。
  2. 选择“1904日期系统”选项。
  3. 点击确定
在Microsoft Excel中选择1904日期系统
todo:image_alt_text

请参阅以下示例代码,了解如何使用Aspose.Cells API 实现此功能。

const path = require("path");
const AsposeCells = require("aspose.cells.node");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "book1.xlsx");
// Initialize a new Workbook
// Open an excel file
const workbook = new AsposeCells.Workbook(filePath);

// Implement 1904 date system
workbook.getSettings().setDate1904(true);

// Save the excel file
workbook.save(path.join(dataDir, "Mybook.out.xlsx"));