Subject: | parsing error of #REF et #VALUE. |
Dear,
This is, I think, a subset of bug id 70129.
Below is a patch proposal to remove the parsing errors for '#REF!' and
'#VALUE!' present in the sheet.
Both can be condensed in one line, but I was not sure about future
distinction/modification for those bad values. This is removing some
parsing errors in my case.
--- XLSX/Fmt2007.pm 2010-05-21 17:08:36.000000000 +0200
+++ Fmt2007.pm 2011-09-20 09:41:42.000000000 +0200
@@ -90,10 +90,14 @@
# $oBook->{Format}[$oCell->{FormatNo}]->{FmtIdx}, $oBook);
unless(defined($sFmtStr)) {
- if ($oCell->{Type} eq 'Numeric') {
- if($oCell->{Format}){
- $sFmtStr=$oCell->{Format};
- } elsif(int($oCell->{Val}) != $oCell->{Val}) {
+ if ($oCell->{Val} =~ /#REF!/ ) {
+ $sFmtStr = '@';
+ } elsif ( $oCell->{Val} =~ /#VALUE!/ ) {
+ $sFmtStr = '@';
+ } elsif ($oCell->{Type} eq 'Numeric') {
+ if($oCell->{Format}){
+ $sFmtStr=$oCell->{Format};
+ } elsif(int($oCell->{Val}) != $oCell->{Val}) {
$sFmtStr = '0.00';
}
else {
As requested:
----
Spreadsheet-XLSX-0.13
----
perl -v
This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi
(with 53 registered patches, see perl -V for more detail)
----
Linux SoMeThIng 2.6.26-2-amd64 #1 SMP Mon Jun 13 16:29:33 UTC 2011
x86_64 GNU/Linux
----
Cheers,
psychedelys