Implement 1904 Date System

Contents
[ ]

To implement 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.

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