jandrew / Spreadsheet-XLSX-Reader-LibXML

Read spreadsheet files with xlsx extentions
Other
4 stars 2 forks source link

Add support for .xlsm files #68

Closed morungos closed 9 years ago

morungos commented 9 years ago

Currently won't open .xlsm files, and it probably should since they are supposed to be identical in structure to .xlsx files, apart from being macro-enabled (and therefore containing code). I have data in one of these, and (even though I don't care about the macros) it'd be nice to be able to open it.

Error received is:

Attribute (file_name) does not pass the type constraint because: The string -/Users/stuartw/Documents/Tracker Data/IMPACT-001 Accrual Tracker.xlsm- does not have an xlsx file extension at constructor Spreadsheet::XLSX::Reader::LibXML::new (defined at /Users/stuartw/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Spreadsheet/XLSX/Reader/LibXML.pm line 970) line 226
    Spreadsheet::XLSX::Reader::LibXML::new('Spreadsheet::XLSX::Reader::LibXML', 'file_name', '/Users/stuartw/Documents/Tracker Data/IMPACT-001 Accrual Tracker.xlsm') called at src/main/etc/load.pl line 141
    main::extract('HASH(0x7f8aaf15a9a8)', 'HASH(0x7f8aace83c68)', '/Users/stuartw/Documents/Tracker Data/IMPACT-001 Accrual Tracker.xlsm') called at src/main/etc/load.pl line 71
jandrew commented 9 years ago

Stewart,

I just did a quick peek and I agree that .xlsm files appear to have identical structures. (I never looked before) Let me make a test case and add it to v0.38.16. (First pass changes appears to be fairly straight forward)

Just to confirm you are not asking for an API to the code in the vbaProject.bin sub-file (Where the vbscript macros are stored) just the content of the worksheets?

Best Regards,

Jed

morungos commented 9 years ago

No, definitely not, just the data that's the same as a regular .xlsx. The vbaProject.bin would be awful to contemplate. Many thanks for this.