Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
To implement 1904 date system in Microsoft Excel (for example Microsoft Excel 2003):
| Selecting 1904 date system in Microsoft Excel |
|---|
![]() |
| See the following sample code on how to achieve this using Aspose.Cells APIs. |
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
int main()
{
Aspose::Cells::Startup();
// Source directory path
U16String srcDir(u"..\\Data\\01_SourceDirectory\\");
// Output directory path
U16String outDir(u"..\\Data\\02_OutputDirectory\\");
// Path of input excel file
U16String inputFilePath = srcDir + u"book1.xlsx";
// Path of output excel file
U16String outputFilePath = outDir + u"Mybook.out.xlsx";
// Create workbook
Workbook workbook(inputFilePath);
// Implement 1904 date system
WorkbookSettings settings = workbook.GetSettings();
settings.SetDate1904(true);
// Save the excel file
workbook.Save(outputFilePath);
std::cout << "Excel file saved successfully with 1904 date system!" << std::endl;
Aspose::Cells::Cleanup();
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.