Implementieren Sie das 1904 Datensystem mit Node.js über C++

Contents
[ ]

Um das 1904-Datensystem in Microsoft Excel zu implementieren (zum Beispiel in Microsoft Excel 2003):

  1. Wählen Sie im Extras-Menü die Option Optionen und wählen Sie den Tab Berechnung.
  2. Wählen Sie die Option 1904-Datensystem aus.
  3. Klicken Sie auf OK.
Auswählen des 1904-Datensystems in Microsoft Excel
todo:image_alt_text

Sehen Sie sich den folgenden Beispielcode an, wie Sie dies mit Aspose.Cells-APIs erreichen können.

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