From 48c05714c254df089e170c014661db9a4bc7d21d Mon Sep 17 00:00:00 2001 From: Steve Simms Date: Thu, 29 Oct 2015 16:05:14 -0400 Subject: Check to see if rows and columns are hidden --- lib/Spreadsheet/ParseXLSX.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm index 535063a..037803a 100644 --- a/lib/Spreadsheet/ParseXLSX.pm +++ b/lib/Spreadsheet/ParseXLSX.pm @@ -148,7 +148,9 @@ sub _parse_sheet { my @column_formats; my @column_widths; + my @columns_hidden; my @row_heights; + my @rows_hidden; my $default_row_height = 15; my $default_column_width = 10; @@ -253,6 +255,7 @@ sub _parse_sheet { for my $colnum ($col->att('min')..$col->att('max')) { $column_widths[$colnum - 1] = $col->att('width'); $column_formats[$colnum - 1] = $col->att('style'); + $columns_hidden[$colnum - 1] = $col->att('hidden'); } $twig->purge; @@ -262,6 +265,7 @@ sub _parse_sheet { my ( $twig, $row ) = @_; $row_heights[ $row->att('r') - 1 ] = $row->att('ht'); + $rows_hidden[ $row->att('r') - 1 ] = $row->att('hidden'); $twig->purge; }, @@ -396,10 +400,12 @@ sub _parse_sheet { $sheet->{RowHeight} = [ map { defined $_ ? 0+$_ : 0+$default_row_height } @row_heights ]; + $sheet->{RowHidden} = \@rows_hidden; $sheet->{ColWidth} = [ map { defined $_ ? 0+$_ : 0+$default_column_width } @column_widths ]; $sheet->{ColFmtNo} = \@column_formats; + $sheet->{ColHidden} = \@columns_hidden; } -- cgit v1.2.3-54-g00ecf