Implementieren Sie das 1904 Datensystem
Um das 1904-Datensystem in Microsoft Excel zu implementieren (zum Beispiel Microsoft Excel 2003):
-
Wählen Sie im Extras-Menü die Option Optionen und wählen Sie den Tab Berechnung.
-
Wählen Sie die Option 1904-Datensystem aus.
-
Klicken Sie auf OK.
Auswählen des Datumsformats 1904 in Microsoft Excel
Sehen Sie sich den folgenden Beispielcode an, wie Sie dies mit Aspose.Cells-APIs erreichen können.
// 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(Implement1904DateSystem.class); | |
// Initialize a new Workbook | |
Workbook workbook = new Workbook(dataDir + "Mybook.xlsx"); | |
// Implement 1904 date system | |
workbook.getSettings().setDate1904(true); | |
// Save the excel file | |
workbook.save(dataDir + "OutPut.xls"); |