Skip Menu |

This queue is for tickets about the Spreadsheet-XLSX CPAN distribution.

Report information
The Basics
Id: 84066
Status: resolved
Priority: 0/
Queue: Spreadsheet-XLSX

People
Owner: Nobody in particular
Requestors: EDAVIS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.13-withoutworldwriteables
Fixed in: (no value)



Subject: Way to read 1904 flag
Dates in Excel files (even XLSX) can be in one of two conventions, 1900 or 1904. When reading the file you need to know which convention is used to correctly convert a date number to a date. So Spreadsheet::XSLX should have a way to query this flag (or alternatively, it should automatically convert dates for you so you don't have to add days to 1900 or 1904).
I think this can be determined from xl/workbook.xml with XML like <workbookPr date1904="1"
Looking at the code it appears this is available: my $r = new Spreadsheet::XLSX $_; say "1904? $r->{Flg1904}"; It just needs to be documented.
Spreadsheet::XLSX isa Spreadsheet::ParseExcel::Workbook. using_1904_date() as documented there will return the flag value without having to poke around in the hash.