tags 298484 patch forwarded 298484 http://rt.cpan.org/NoAuth/Bug.html?id=7206 thanks
> Cell A1 of this sheet has contents of 1210. But for some reason, Ss::PE > returns "GENERAL" for it instead: > This bug appeared when we switched from Excel to OOo; it happens > arbitrarily, and I haven't been able to find a pattern for its > occurrence. Changing the format of a cell from general to text seems to > prevent this problem. Hi, this looks like an OpenOffice peculiarity. The format string of the cell is indeed literally "GENERAL", instead of containing a format code as usual. Spreadsheet::ParseExcel isn't prepared for this. The attached simple patch works around the problem. The bug is also reported upstream as CPAN bug 7206, <http://rt.cpan.org/NoAuth/Bug.html?id=7206>. I have forwarded the patch there as well. Cheers, -- Niko Tyni [EMAIL PROTECTED]
--- libspreadsheet-parseexcel-perl-0.2603.orig/ParseExcel/Utility.pm +++ libspreadsheet-parseexcel-perl-0.2603/ParseExcel/Utility.pm @@ -33,6 +33,10 @@ my $sCond; my $sWkF =''; my $sRes=''; + + # OpenOffice peculiarity? + $sFmt = '@' if ($sFmt eq "GENERAL"); + #1. Get Condition if($sFmt=~/^\[([<>=][^\]]+)\](.*)$/) { $sCond = $1;