in reply to Re: Spreadsheet::ParseXLSX or Spreadsheet::ParseExcel doesn't work with .xlsx
in thread Spreadsheet::ParseXLSX or Spreadsheet::ParseExcel doesn't work with .xlsx

To use Spreadsheet::Read, do I need to install Spreadsheet::ParseExcel as well? I have already installed Spreadsheet::Read but it seems that my script does not load any data from the excel file
  • Comment on Re^2: Spreadsheet::ParseXLSX or Spreadsheet::ParseExcel doesn't work with .xlsx

Replies are listed 'Best First'.
Re^3: Spreadsheet::ParseXLSX or Spreadsheet::ParseExcel doesn't work with .xlsx
by Tux (Abbot) on Oct 20, 2020 at 07:41 UTC

    You need to have the real parser installed. Spreadsheet::Read is just a unifying frontend API to all the supported parsers. This is like using DBI without knowing what DBD is used: your programm does use DBI; and DBI->connect decides what DBD to load. Likewise for Spreadsheet::Read.

    So to parse .xslx you have to install Spreadsheet::ParseXLSX and then you do somthing like:

    use strict; use warnings; use Spreadsheet::Read; my $book = Spreadsheet::Read->new ("file.xlsx"); my $sheet = $book->sheet (1); my $a3 = $sheet->cell ("A3");

    Enjoy, Have FUN! H.Merijn
      Thank you for the answer!