diff options
author | Meredith Howard <mhoward@roomag.org> | 2014-06-25 02:32:01 -0400 |
---|---|---|
committer | Meredith Howard <mhoward@roomag.org> | 2014-06-25 02:32:01 -0400 |
commit | 87353c23dc1fcbd30620bc943e6cdb136722ce5c (patch) | |
tree | 1f32e561a7271ec4a0fb5fb71a4ffc5f50c35611 /lib/Spreadsheet | |
parent | d38a12eb78321133e7a14aa0e72a5c22c17a271b (diff) | |
download | spreadsheet-parsexlsx-87353c23dc1fcbd30620bc943e6cdb136722ce5c.tar.gz spreadsheet-parsexlsx-87353c23dc1fcbd30620bc943e6cdb136722ce5c.zip |
Return missing comments, clean ws
Diffstat (limited to 'lib/Spreadsheet')
-rw-r--r-- | lib/Spreadsheet/ParseXLSX.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm index e15d3e7..9ca079a 100644 --- a/lib/Spreadsheet/ParseXLSX.pm +++ b/lib/Spreadsheet/ParseXLSX.pm @@ -144,6 +144,7 @@ sub _parse_sheet { my $sheet_xml = XML::Twig->new( twig_roots => { + #XXX need a fallback here, the dimension tag is optional 'dimension' => sub { my ($twig, $dimension) = @_; @@ -232,7 +233,7 @@ sub _parse_sheet { # 2nd pass: cell/row building is dependent on having parsed the merge definitions # beforehand. - + $sheet_xml = XML::Twig->new( twig_roots => { 'sheetData/row' => sub { @@ -316,7 +317,7 @@ sub _parse_sheet { if ( ! $sheet->{Cells} ){ $sheet->{MaxRow} = $sheet->{MaxCol} = -1; } - + $sheet->{DefRowHeight} = 0+$default_row_height; $sheet->{DefColWidth} = 0+$default_column_width; $sheet->{RowHeight} = [ @@ -340,7 +341,9 @@ sub _parse_shared_strings { 'si' => sub { my ( $twig, $si ) = @_; - push @$PkgStr, + # XXX this discards information about formatting within cells + # not sure how to represent that + push @$PkgStr, join( '', map { $_->text } $si->find_nodes('.//t') ); $twig->purge; }, |