Bug#298484: libspreadsheet-parseexcel-perl: Some cells return
"GENERAL" instead of value
Niko Tyni
ntyni at iki.fi
Thu Dec 29 13:27:03 UTC 2005
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 ntyni at iki.fi
-------------- next part --------------
--- 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;
More information about the pkg-perl-maintainers
mailing list