[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libspreadsheet-parseexcel-perl problem?



I just downloaded and looked at it. Those specific lines involving
$cell->Value have been changed to:

          $output .=  $cell->Value if(defined $cell);

Which remedies the problem of calling "Value" on an undefined value
($cell).

Here's where I downloaded the latest package,

<http://packages.debian.org/unstable/interpreters/libspreadsheet-parseexcel-perl.html>


Elizabeth


bxf4@psu.edu (Brian P. Flaherty) writes:

> Hello,
> 
> I just installed libspreadsheet-parseexcel-perl from testing and the
> xls2csv.pl in the
> /usr/share/doc/libspreadsheet-parseexcel-perl/examples/xls2csv.pl
> gives me an error when I try to run it.
> 
> bxf4@c119756-b:~$ ~/bin/xls2csv.pl ps.xls 1-A1:C3
> Can't call method "Value" on an undefined value at /usr/share/perl5/Spreadsheet/ParseExcel/Utility.pm line 994.
> 
> I don't know very much perl, but here is the relevant section of
> Utility.pm (beginning at line 990):
> 
> 	if( !$rotate) {       
>    	for( my $y = $y1 ; $y <= $y2 ; $y++) {
>    	   for( my $x = $x1 ; $x <= $x2 ; $x++) {
>    	      my $cell = $oWkS->{Cells}[$y][$x] ;
>    	      $output .=  $cell->Value ;
>    	      $output .= "," if( $x != $x2) ;
>    	   }
>    	   $output .= "\n" ;
>    	}
> 
> I think that it doesn't like 'Value' on the fifth line.  The word
> 'Value' doesn't appear anywhere before in Utility.pm and only occurs
> once more later.  I checked one of the other examples dmpEx.pl, and it
> appears to work.  dmpEx.pl also has the 'Value' term used, so I am
> puzzled as to why the other did not.  Any thoughts or suggestions will
> be appreciated.


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: