Subject: | Bug in parsing XLSX |
Date: | Wed, 3 Jul 2013 08:23:12 +0200 (CEST) |
To: | bug-Spreadsheet-XLSX [...] rt.cpan.org |
From: | "Felix Schnellinger" <eff.ess [...] web.de> |
Hi there,
the attached spreadsheet produces errors when creating a new xlsx object
perl code:
my $excel = Spreadsheet::XLSX -> new ($infile);
output:
Argument "<f>" isn't numeric in int at /usr/local/share/perl/5.10.1/Spreadsheet/XLSX/Fmt2007.pm line 96.
I believe the following patch in XLSX.pm will solve the problem. Solution: When parsing the xlsx, check for closing AND EMPTY v-Tags before checking for opening v-tags
diff:
175a176,178
> elsif (/^<\/v/ || /^<v\/>/) {
> $flag = 0;
> }
178,180d180
< }
< elsif (/^<\/v/) {
< $flag = 0;
Please give me some feedback.
Best regards,
Felix Schnellinger
Message body not shown because it is not plain text.