in reply to Spreadsheet::ParseExcel::Simple, reading specific cells?


The Spreadsheet::ParseExcel::Simple sheets() method returns a list of worksheet objects. Therefore, to access the second worksheet you can do something like the following:
#!/usr/bin/perl -w use strict; use Spreadsheet::ParseExcel::Simple; my $workbook = Spreadsheet::ParseExcel::Simple->read('example.xls +'); my $worksheet = ($workbook->sheets())[1]; while ($worksheet->has_data()) { my @data = $worksheet->next_row(); print "@data\n"; }
To get to a specific row you will have to repeatedly call next_row(). You cannot explicitly reference a column using Spreadsheet::ParseExcel::Simple so you will have to programmitically build up a column array using the data returned from the rows.

--
John.

Replies are listed 'Best First'.
Re^2: Spreadsheet::ParseExcel::Simple
by Anonymous Monk on Jan 20, 2013 at 17:35 UTC
    Hello, I am complete newbie to Perl, but... what about looking here http://search.cpan.org/~jmcnamara/Spreadsheet-ParseExcel-0.59/lib/Spreadsheet/ParseExcel/Workbook.pm It is about Spreasheet::ParseExcel, still look worksheet() method.