in reply to How to retreive data's from excel to perl ?

You can read an Excel sheet like this (code snip)
... use Spreadsheet::ParseExcel; my $oBook = Spreadsheet::ParseExcel::Workbook->Parse($file); my $oWkS = $oBook->{Worksheet}[0]; for(my $i = $oWkS->{MinRow}+1 ; defined $oWkS->{MaxRow} && $i <= $oWkS +->{MaxRow} ; $i++) { my $oWkC1 = $oWkS->{Cells}[$i][0]; } ...
"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.

Replies are listed 'Best First'.
Re^2: How to retreive data's from excel to perl ?
by adrianh (Chancellor) on Apr 07, 2005 at 13:57 UTC

    If all you need to do is extract raw data from an Excel sheet I find Spreadsheet::ParseExcel::Simple saves typing and is far easier to read. YMMV:

    my $xls = Spreadsheet::ParseExcel::Simple->read( 'spreadsheet.xls' ); foreach my $sheet ($xls->sheets) { while ($sheet->has_data) { print join( ', ', $sheet->next_row ), "\n"; } }