Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I need some help understanding how this command works. I see that it determines how many rows and columns are being used. What I am trying to figure out is how to use it in determining what is is the cells and then write only those rows out to a different spreadsheet.

2006-09-13 Retitled by GrandFather, as per Monastery guidelines (navigation hazard)
Original title: 'Spreadshee::ParseExcel'

Replies are listed 'Best First'.
Re: Using Spreadsheet::ParseExcel
by GrandFather (Saint) on Sep 13, 2006 at 22:26 UTC

    From the documentation for Spreadsheet::ParseExcel:

    for(my $iR = $oWkS->{MinRow} ; defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $i +R++) { 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) +; } }

    Note in particular the two lines:

    $oWkC = $oWkS->{Cells}[$iR][$iC]; print "( $iR , $iC ) =>", $oWkC->Value, "\n" if($oWkC);

    DWIM is Perl's answer to Gödel