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-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Initialize a new Workbook
// Open an excel file
Workbook workbook = new Workbook(dataDir+ "book1.xlsx");
// Implement 1904 date system
workbook.Settings.Date1904 = true;
// Save the excel file
workbook.Save(dataDir+ "Mybook.out.xlsx");