diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-05-07 16:28:24 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-05-07 16:28:24 -0500 |
commit | 7da8dd25cde50da9b2332c11b636481f084ac574 (patch) | |
tree | 487c68b01c8b280795026471bc0176c3ce1fa877 | |
parent | 47941084e62431a9283eaa44d4ccdd5cc3422066 (diff) | |
download | spreadsheet-template-7da8dd25cde50da9b2332c11b636481f084ac574.tar.gz spreadsheet-template-7da8dd25cde50da9b2332c11b636481f084ac574.zip |
one more
-rw-r--r-- | lib/Spreadsheet/Template/Generator/Parser/Excel.pm | 8 | ||||
-rw-r--r-- | lib/Spreadsheet/Template/Generator/Parser/XLSX.pm | 9 |
2 files changed, 10 insertions, 7 deletions
diff --git a/lib/Spreadsheet/Template/Generator/Parser/Excel.pm b/lib/Spreadsheet/Template/Generator/Parser/Excel.pm index 0045ce4..f2d5b6d 100644 --- a/lib/Spreadsheet/Template/Generator/Parser/Excel.pm +++ b/lib/Spreadsheet/Template/Generator/Parser/Excel.pm @@ -133,9 +133,11 @@ sub _parse_cell { $format_data->{text_wrap} = JSON::true if $format->{Wrap}; } - my $wb = $self->excel; - $format_data->{num_format} = $wb->{FormatStr}{$format->{FmtIdx}} - unless $wb->{FormatStr}{$format->{FmtIdx}} eq 'GENERAL'; + if (!$format->{IgnoreNumberFormat}) { + my $wb = $self->excel; + $format_data->{num_format} = $wb->{FormatStr}{$format->{FmtIdx}} + unless $wb->{FormatStr}{$format->{FmtIdx}} eq 'GENERAL'; + } } my $data = { diff --git a/lib/Spreadsheet/Template/Generator/Parser/XLSX.pm b/lib/Spreadsheet/Template/Generator/Parser/XLSX.pm index cfb13a7..820bddf 100644 --- a/lib/Spreadsheet/Template/Generator/Parser/XLSX.pm +++ b/lib/Spreadsheet/Template/Generator/Parser/XLSX.pm @@ -140,10 +140,11 @@ sub _parse_styles { : 2; Spreadsheet::ParseExcel::Format->new( - IgnoreFont => !$_->att('applyFont'), - IgnoreFill => !$_->att('applyFill'), - IgnoreBorder => !$_->att('applyBorder'), - IgnoreAlignment => !$_->att('applyAlignment'), + IgnoreFont => !$_->att('applyFont'), + IgnoreFill => !$_->att('applyFill'), + IgnoreBorder => !$_->att('applyBorder'), + IgnoreAlignment => !$_->att('applyAlignment'), + IgnoreNumberFormat => !$_->att('applyNumberFormat'), FontNo => $iFnt, Font => $excel->{Font}[$iFnt], |