Skip Menu |

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

Report information
The Basics
Id: 89603
Status: resolved
Priority: 0/
Queue: Spreadsheet-ParseExcel-Stream

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

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



Subject: Need use_1904_date() exposed.
I get spreadsheets from a variety of sources and, unfortunately, I don't always know if they're using the 1900 or 1904 date system (http://blogs.perl.org/users/ovid/2013/10/fighting-20-year-old-software-bugs.html). With Spreadsheet::ParseExcel, it's trivial: my $parser = Spreadsheet::ParseExcel->new->parse($excel); say $parser->using_1904_date ? 1904 : 1900; If you could expose that value, it would be very handy. Every attempt I've made to work around this has hit yet another bug: http://stackoverflow.com/questions/19122203/spreadsheetparseexcelstream-losing-its-parser Cheers, Ovid
On Fri Oct 18 08:11:47 2013, OVID wrote: Show quoted text
> my $parser = Spreadsheet::ParseExcel->new->parse($excel); > say $parser->using_1904_date ? 1904 : 1900;
Should be easy to implement. Though looking at the code, it looks like a workbook method, not a parser method. If a reference to the workbook variable (and maybe the XLS parser variable) in the new() method is added to the object hash, and maybe a convenience method added to S::PE::S ($parser->workbook() ... returning the current workbook), that might do it, yes? Would maybe have to be done in both XLS and XLSX versions (or is that needed in XLSX?).
On Fri Oct 18 08:11:47 2013, OVID wrote: Show quoted text
> If you could expose that value, it would be very handy. Every attempt
Created workbook() method to expose the workbook in both XLS and XLSX versions. Also added missing worksheet() method in XLSX version.