doy / spreadsheet-parsexlsx

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

Can't call method "att" on an undefined value at ....share/perl/site_perl/Spreadsheet/ParseXLSX.pm line 545. #23

Closed 27484274 closed 9 years ago

27484274 commented 10 years ago

I am trying to load a XLSX file and I am getting this issue. This issue seems to be addressed in previous release but re-emerging in this release.

I have the PERL installed on UNIX (Sun Solaris 10) box. The web page calls the CGI script which ftps the file in binary and then tries to parse it through Spreadsheet::Read which in turn uses ParseXLSX

Please see the extract for ParseXLSX version.

package Spreadsheet::ParseXLSX; BEGIN { $Spreadsheet::ParseXLSX::AUTHORITY = 'cpan:DOY'; } $Spreadsheet::ParseXLSX::VERSION = '0.14'; use strict; use warnings;

capture

doy commented 10 years ago

Can you give me an example Excel file which produces this error?

27484274 commented 10 years ago

I am giving you two files. Both encountered the same error.  On Thursday, May 8, 2014 1:32 PM, Jesse Luehrs notifications@github.com wrote:

Can you give me an example Excel file which produces this error? — Reply to this email directly or view it on GitHub.

doy commented 10 years ago

Github doesn't support attachments in email comments - can you email them to me directly?

27484274 commented 10 years ago

I am sending it to your tozt.net email.  On Thursday, May 8, 2014 3:43 PM, Jesse Luehrs notifications@github.com wrote:

Github doesn't support attachments in email comments - can you email them to me directly? — Reply to this email directly or view it on GitHub.

doy commented 10 years ago

For reference: http://paste.tozt.net/2014-05-087xqBcccj-bug-23-1.xlsx http://paste.tozt.net/2014-05-08wQ9ZWLdY-bug-23-2.xlsx

doy commented 10 years ago

I can't reproduce this issue - calling parse on those two spreadsheets works fine for me. Are you doing anything other than my $wb = Spreadsheet::ParseXLSX->new->parse($filename);? What version of perl are you using?

doy commented 10 years ago

Also, what version of XML::Twig do you have installed?

headhacker commented 10 years ago

Same issue for me using exact call as above .. error is Can't call method "att" on an undefined value at /Library/Perl/5.16/Spreadsheet/ParseXLSX.pm line 56.

XML::Twig is up to date (3.48). perl -v = 5.16

wwjnufc commented 10 years ago

i think the parser is looking for a null/non-existent attribute from the xlsx in line 56. when i randomly fill in all the fields under 'menu'>'prepare'>'doc property' in excel, the error will no longer show up

Update: a generated XLSX might not have any version history meaning it is null. When it is null it causes this error. Even a simple action like opening the xlsx and saving it will stop this error msg. This is from my own testing.

headhacker commented 10 years ago

Thanks, I'll give it a try. Might be able to generate the history somehow as well.

doy commented 10 years ago

I've made some changes here - let me know if version 0.16 works better for you.