This error occurs when the last worksheet with data is placed in the Excel File behind the worksheets with diagrams. When the diagrams are at the end of the Excel File then it works fine. I don't know is there a bug in the perl module or maybe this is an Excel bug ? I use Excel2000 on Windows XP SP1 and perl v5.8.5 on SUSE Linux 9.2 and Spreadsheet-ParseExcel-0.2603. I am sorry about my bad english, i hope you understand what is the problem i have. :) Maybe you have some time to have a look at this problem.use strict; if(!(defined $ARGV[0])) { print<<EOF; Usage: $0 Excel_File EOF exit; } use Spreadsheet::ParseExcel; my $oExcel = new Spreadsheet::ParseExcel; my $oBook = $oExcel->Parse($ARGV[0]); 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]; foreach my $oWkS (@{$oBook->{Worksheet}}) { 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->{MaxC +ol} ; $iC++) { $oWkC = $oWkS->{Cells}[$iR][$iC]; print "( $iR , $iC ) =>", $oWkC->Value, "\n" if($oWkC); print $oWkC->{_Kind}, "\n"; } } }
In reply to trouble with Spreadsheet::ParseExcel by luckyluke
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |