Subject: | Cannot process Google Drive .xlsx files |
A few months ago, automated downloads of Google spreadsheets no longer included the ODS format. While XLSX format is available, the structure of that file format from Google cause problems with Spreadsheet::Read; or at least problems with the underlying parsers.
While the module has not yet been released, a fix to work with the new structure was made to Spreadsheet::ParseXLSX a couple of days ago. (Check https://github.com/doy/spreadsheet-parsexlsx/issues/29). Without the fix, the error message with the attached sample document was
Can't call method "first_child" on an undefined value at /opt/local/lib/perl5/site_perl/5.20/Spreadsheet/ParseXLSX.pm line 455.
453 styles => [
454 map {
455 $border{$border->first_child($_)->att('style') || 'none'}
456 } qw(left right top bottom)
457 ],
I did not delve too deeply into the issue, but it seems like the order of expected XML elements changed. When I installed that unreleased ParseXLSX.pm directly, the problem shifted to Spreadsheet::XLSX.
Spreadsheet::XLSX also has a problem with google's interpretation of the XLSX structure. Its warning message, which is symptomatic of a deeper problem, is
Use of uninitialized value in concatenation (.) or string at /opt/local/lib/perl5/site_perl/5.20/Spreadsheet/XLSX.pm line 150.
148 foreach my $sheet (@Worksheet) {
149
150 my $member_sheet = $self -> {zip} -> memberNamed ("xl/$sheet->{path}") or next;
151
The problem is $sheet->{path} is undefined instead matching the corresponding XML file in the xl/worksheets/ directory of the unzipped spreadsheet.
Unfortunately, Spreadsheet::XLSX has not been updated in five years and has quite a backlog of issues. (https://rt.cpan.org/Public/Dist/Display.html?Name=Spreadsheet-XLSX) Rather than wait for a fix in that module, I tried, and failed, to modify the source so Spreadsheet::Read skip it and use ParseXLSX instead.
Is there some way to deprecate the use of Spreadsheet::XLSX in favor of a current, and functional, alternative?
Environment:
Spreadsheet::XLSX version 0.13
Spreadsheet::ParseXLSX version 0.16
Spreadsheet::ParseExcel version 0.65
Spreadsheet::Read version 0.58
perl v5.20.1 for darwin (aka OS X)
Subject: | bug_demo.xlsx |
Message body not shown because it is not plain text.