Skip to main content.
home | support | download

Back to List Archive

Re: swish-filter-test error for Excel

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Fri Aug 29 2003 - 14:05:41 GMT
On Fri, Aug 29, 2003 at 12:41:07AM -0700, Bucharow Leonard wrote:
> Hi Bill,
> 
> thank you for help. I've tried the filter test. The PDF and Word files run
> through the test, but with Excel I've get the following:
> 
> $ swish-filter-test http://localhost/test/excel.xls
> 
> 12319 Warning - http://localhost/test/excel.xls: Use of uninitialized value
> in concatenation (.) or string at
> /usr/local/lib/swish-e/perl/SWISH/Filters/XLtoHTML.pm line 105.
> 
> Document http://localhost/test/excel.xls was  filtered.
>    Document:     http://localhost/test/excel.xls
>    Content-Type: text/html  (initial was application/vnd.ms-excel)
>    Parser type:  HTML*
>  
> Have you a solution, what could cause this error?

Right, as Joachim said, there's a warning about an uninitialized value
in XLtoHTML at line 105.  Looking at line 105 I see:

    101             # For each cell do the following
    102             $oWkC = $oWkS->{Cells}[$iR][$iC];
    103 
    104             my $CellData = encode_entities($oWkC->Value) if($oWkC);
    105             $ExcelWorkSheet .= "\t<td>" . $CellData . "</td>\n";

So it looks like $CellData is uninitialized.  I don't know how that 
module works in detail but I just submitted this change:

    101             # For each cell do the following
    102             $oWkC = $oWkS->{Cells}[$iR][$iC];
    103 
    104             my $CellData = encode_entities($oWkC->Value) if($oWkC);
    105             $ExcelWorkSheet .= "\t<td>" . $CellData . "</td>\n" if $CellData;

which seems to suppress the messages.

BTW -- I also just checked in to cvs an updated version of swish-filter 
test, in case you want a newer copy (which is what I want, because I 
like people to test things...)


-- 
Bill Moseley
moseley@hank.org
Received on Fri Aug 29 14:06:04 2003