MichaelDaum / spreadsheet-parsexlsx

parse XLSX files
http://metacpan.org/release/Spreadsheet-ParseXLSX
1 stars 3 forks source link

Error trying to open .xlsx file not created by Excel using ParseXLSX version 0.27 #7

Open acggith opened 8 months ago

acggith commented 8 months ago

Bug related to parsing of file Example_Book1.xlsx using ParseXLSX version 0.27. The .xlsx file was NOT created with Excel.

perl code used to generate the bug:

use strict; use warnings; use Spreadsheet::ParseXLSX;

my $UUIDName='Example_Book1.xlsx'; my $parser = Spreadsheet::ParseXLSX->new(); my $workbook = $parser->parse($UUIDName);

Result: Can't call method "att" on an undefined value at /usr/share/perl5/vendor_perl/Spreadsheet/ParseXLSX.pm line 900.

Comments: 1.) Bug is related to the variable $type_base in sub _extract_files of /usr/share/perl5/vendor_perl/Spreadsheet/ParseXLSX.pm. 2.) Opening and saving the file with Excel resolves the problem.

MichaelDaum commented 8 months ago

Basically purl.oclc.org (strict ooxml namespace) is not supported, only schemas.openxmlformats.org. Pull requests welcome.

MichaelDaum commented 8 months ago

The unit test in t/bug-md-7.t has been disabled temporarily unless this feature has been implemented.