in reply to Re: Spreadsheet::XLSX parsing workbook, but not retrieving values from cells
in thread Spreadsheet::XSLX parsing workbook, but not retrieving values from cells

Hi Athanasius, Thanks for the reply, but the code still doesn't work for me.

1. According to this page at CPAN

"Spreadsheet::Read tries to transparently read *any* spreadsheet and return its content in a universal manner independent of the parsing module that does the actual spreadsheet scanning.

For OpenOffice and/or LibreOffice this module uses Spreadsheet::ReadSXC

For Microsoft Excel this module uses Spreadsheet::ParseExcel, Spreadsheet::ParseXLSX, or Spreadsheet::XLSX.

For CSV this module uses Text::CSV_XS or Text::CSV_PP.

For SquirrelCalc there is a very simplistic built-in parser"

So, I think it wouldn't matter if I used Spreadsheet::Read instead of Spreadsheet::XLSX. In any case, I tried changing the use statement, and it still doesn't make a difference. The cells are still not read.

2. Can you please explain what you mean when you say single- and double-quote characters are non-ASCII characters? Do you mean I should check if there are quotes in the Excel file itself? If so, no, there aren't any characters within quotes in the file.

3. I'm pretty sure the file is not empty, and I verified it by opening it, with the Excel application.

  • Comment on Re^2: Spreadsheet::XSLX parsing workbook, but not retrieving values from cells

Replies are listed 'Best First'.
Re^3: Spreadsheet::XSLX parsing workbook, but not retrieving values from cells
by Tux (Canon) on Sep 17, 2014 at 12:47 UTC

    But when using Spreadsheet::Read, you should also use the methods that Spreadsheet::Read provides and not use the methods the undelying parser might use. That defeats the purpose of the wrapper.

    First install Spreadsheet::ParseXLSX and then read the file using the right syntax:

    use strict; use warnings; use Spreadsheet::Read; my $excel = ReadData ("xyz.xlsx"); defined $excel or die; print "Read with ", $excel->[0]{parser}, "\n";

    Regarding the quotes, that might be a cut-n-paste (windows) problem. The post of your code shows the use of "smart"-quotes “ U0201c \N{LEFT DOUBLE QUOTATION MARK} instead of plain duoble-quote ".


    Enjoy, Have FUN! H.Merijn

      Hi,

      Thanks for the suggestion. I tried using Spreadsheet::ParseXLSX to read the file, and it seems to work just fine.

      So I think this problem is solved, but has taken me to the next problem which is that my file seems too big and therefore causes some kind of segmentation fault. That, according to the documentation, is to be expected for extremely big files.

      Any suggestion on using another library for bigger files?

      Thanks!