Error when export data date with year lower 1900

Hi,

We use flexcel to export data with date lower year 1900.

So data error, that show ######## in file.

photo_2022-11-21_14-21-15

Please help me resole this error.

Hi,
Sadly that is how Excel works, dates start at year 1900 (or 1904 if you use a 1904 date system). It is not possible to enter a date less than 1900 in Excel. (and dates in 1900 itself are problematic because they consider jan-29-1900 to be a leap year, and it was not)

If you need to enter older dates, you need to enter them as strings, not dates. How to enter dates as strings depends in if you are using Reports or the API.

in the API, you would just use

xls.SetCellValue(row, col, date.ToString());

or

xls.SetCellValue(row, col, "01/01/1870");

With the reports, the simplest way is to select the dates as strings in the SQL directly, so they will not be converted to .NET dates