monitorjbl / excel-streaming-reader

An easy-to-use implementation of a streaming Excel reader using Apache POI
Apache License 2.0
946 stars 343 forks source link

xlsx files with date1904 interpreted as 1900 dates. #218

Closed oyvindwe closed 1 year ago

oyvindwe commented 4 years ago

Using LibreOffice on Linux, we created an xlsx file where the dates were off by 5 years and a day when parsing.

It turned out that the attriibute date1904 may be set to either 1 or true to indicate 1904-01-01 as base date, se e.g. https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.workbookproperties?view=openxml-2.8.1 which points to https://www.w3.org/TR/xmlschema-2/#boolean (I tried to look this up in Office Open spec, but it was rather hard to navigate.)

oyvindwe commented 1 year ago

Closing as it is fixed in https://github.com/pjfanning/excel-streaming-reader/pull/20