Implement 1904 Date System with Node.js via C++

Contents
[ ]

To implement the 1904 date system in Microsoft Excel (for example, Microsoft Excel 2003):

  1. From the Tools menu, select Options, and select the Calculation tab.
  2. Select the 1904 date system option.
  3. Click OK.
Selecting 1904 date system in Microsoft Excel
todo:image_alt_text

See the following sample code on how to achieve this using Aspose.Cells APIs.

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