From 87353c23dc1fcbd30620bc943e6cdb136722ce5c Mon Sep 17 00:00:00 2001 From: Meredith Howard Date: Wed, 25 Jun 2014 02:32:01 -0400 Subject: Return missing comments, clean ws --- lib/Spreadsheet/ParseXLSX.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/Spreadsheet/ParseXLSX.pm') 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; }, -- cgit v1.2.3-54-g00ecf