Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Spreadsheet::XLSX won't install on my Strawberry Perl 5.16.3, even with force. Testers on Cpan have reported this. However, on Activestate, same perl version, it is listed in their PPM and it works. So, maybe there could be some hope. Have you some idea of what I could try? The error message I get is:

Running make install Installing C:\berrybrew\5.16.3_32\perl\site\lib\Spreadsheet\XLSX.pm Installing C:\berrybrew\5.16.3_32\perl\site\lib\Spreadsheet\XLSX\Fmt20 +07.pm Installing C:\berrybrew\5.16.3_32\perl\site\lib\Spreadsheet\XLSX\Utili +ty2007.pm Appending installation info to C:\berrybrew\5.16.3_32\perl\lib/perlloc +al.pod MIKEB/Spreadsheet-XLSX-0.15.tar.gz C:\berrybrew\5.16.3_32\c\bin\dmake.exe install UNINST=1 -- OK Stopping: 'install' failed for 'Spreadsheet::XLSX'. Failed during this command: MIKEB/Spreadsheet-XLSX-0.15.tar.gz : make_test NO but failu +re ignored because 'force' in effect

If there is no hope, do you know other modules to read XLSX files

Replies are listed 'Best First'.
Re: Installing Spreadsheet::XLSX
by Tux (Canon) on Apr 21, 2018 at 10:59 UTC

    Do not use Spreadsheet::XLSX. Move to the actively maintained Spreadsheet::ParseXLSX please.


    Enjoy, Have FUN! H.Merijn

      Excellent!!! I was not aware of this newer module!

Re: Installing Spreadsheet::XLSX
by thanos1983 (Parson) on Apr 21, 2018 at 14:00 UTC
Re: Installing Spreadsheet::XLSX
by poj (Abbot) on Apr 21, 2018 at 10:17 UTC

    My active state 5.16.1 shows version 0.13 so try

    cpan install DMOW/Spreadsheet-XLSX-0.13.tar.gz

    poj
Re: Installing Spreadsheet::XLSX
by learnedbyerror (Monk) on Apr 22, 2018 at 20:17 UTC

    You may also want to try Data::XLSX::Parser.

    If you are dealing with large spreadsheets, as I am, you will find it to be much faster than the alternatives.

    Unfortunately, the documentation is somewhat sparse. After hacking around in it, I came up with the following usage pattern as the one the works for me.

    my $parser = Data::XLSX::Parser->new; $parser->open($_xls); # dies in module if unable to open $parser->add_row_event_handler( sub { my ($row) = @_; $csv->print( $fh_csv, $row ); } ); $parser->sheet_by_rid( 'rId'.$parser->workbook->sheet_id($_sht) ); close $fh_csv;

    It is not well maintained, but as you can see from testers, it passes on all perl versions and has worked for me across 5.18, 5.20, 5.22, 5.24 on MacOS, Linux and Windows.

    lbe

      Sorry, didn't realize I posted the above without being logged in an became anonymous :(

      lbe