in reply to Spreadsheet::ParseExcel MaxRow is maxing out at 2954

kyle makes a good point and I would start there ... but you don't show how you set your workseet. Could there be multiple sheets in the excel file and you're getting the wrong one?

#!/usr/bin/perl use strict; use warnings; use Spreadsheet::ParseExcel; my $book = Spreadsheet::ParseExcel::Workbook->Parse( "file.xls" ); foreach my $sheet ( @{$book->{Worksheet}} ) { print "SHEET Name: ", $sheet->{Name}, "\n"; print "SHEET MaxRow: ", $sheet->{MaxRow}, "\n"; }

-derby

Replies are listed 'Best First'.
Re^2: Spreadsheet::ParseExcel MaxRow is maxing out at 2954
by skelooth (Novice) on Apr 29, 2008 at 16:01 UTC

    The following is a copy paste of the spreadsheet near line 2954. I have tried adding and deleting rows to see if it effects the cap, but it still stops at 2954.

    436	82995	Western New York Catholic Long-Term Care, Inc., Series 1993
    		current refunded on May 5, 2004 by mortgage proceeds sales as follows:
    		$10,045,000 called on 6/17/04 @ 101%
    		
    437	82996	Wartburg Home of Evangelical Lutheran Church, Series 1993
    		current refunded on April 28, 2004 by mortgage proceeds sales as follows:
    		$210,000 called 8/1/04 @ par.
    		$15,060,000 called 8/1/04 @ 101%
    ***line 2954 here****		
    438	82997	Elizabeth Church Manor NH Series 1993 current refunded on September 25, 2003
    		by IDA bonds as follows:
    		$6,725,000 called 10/27/03 @ 102%.
    

    As for setting the spreadsheet, here is a more complete code fragment

    my $bk= $Excel->Parse("data/dasnyFootnotes.xls"); my($r, $c, $wks); $wks= $bk->{Worksheet}[0]; my $entry=0; for($r = $wks->{MinRow}; cell($wks,$r,0) !~ /^end$/i; $r++) { if(cell($wks,$r,0) =~ /^(\d+)$/) { #print cell($wks,$r,0)."\n"; $entry=$1; $html[$entry]->[0]= cell($wks,$r,1); $html[$entry]->[1]= ""; # pre init avoids warnings } if($entry > 0 && cell($wks,$r,2) ne "") { $html[$entry]->[1].= cell($wks,$r,2)."<br />"; } }