Spreadsheet-ParseExcel - fail parsing 30 sheets in one worksheet?

Posted on Wed Mar 12 14:18:23 2008 by yael
fail parsing 30 sheets in one worksheet?
Hi all, i'm trying to parse a single worksheet with 30 sheets. (total size of the file 3MB). i run the sample code:
use strict; use Spreadsheet::ParseExcel; my $oExcel = new Spreadsheet::ParseExcel; sub PrnBook($); my $oBook = $oExcel->Parse('my_excel.xls'); PrnBook($oBook); sub PrnBook($) { my($oBook) = @_; my($iR, $iC, $oWkS, $oWkC); print "=========================================\n"; print "FILE :", $oBook->{File} , "\n"; print "COUNT :", $oBook->{SheetCount} , "\n"; print "AUTHOR:", $oBook->{Author} , "\n"; for(my $iSheet=0; $iSheet < $oBook->{SheetCount} ; $iSheet++) { $oWkS = $oBook->{Worksheet}[$iSheet]; print "--------- SHEET:", $oWkS->{Name}, "\n"; for(my $iR = $oWkS->{MinRow} ; defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $iR++) { for(my $iC = $oWkS->{MinCol} ; defined $oWkS->{MaxCol} && $iC <= $oWkS->{MaxCol} ; $iC++) { $oWkC = $oWkS->{Cells}[$iR][$iC]; print "( $iR , $iC ) =>", $oWkC->Value, "\n" if($oWkC); } } } }
for some reason after printing the data from 11 sheets it stop, and just print all the rest sheets names, but nothing else. it seems that after some sheets the values of
$oWkS->{MaxRow}
etc are nil. can it be? if i switch the positions of the sheets, it will print the first 11 sheets and after that again, only the sheet names. so i believe the sheets are ok. can somebody help me? or throw me a hint? thanks, and sorry for my bad english.
Write a response