summaryrefslogtreecommitdiffstats
path: root/lib/Spreadsheet/ParseXLSX.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Spreadsheet/ParseXLSX.pm')
-rw-r--r--lib/Spreadsheet/ParseXLSX.pm16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm
index 99d3c33..264ead6 100644
--- a/lib/Spreadsheet/ParseXLSX.pm
+++ b/lib/Spreadsheet/ParseXLSX.pm
@@ -137,6 +137,7 @@ sub _parse_sheet {
my @merged_cells;
+ my @column_formats;
my @column_widths;
my @row_heights;
@@ -196,8 +197,10 @@ sub _parse_sheet {
'col' => sub {
my ( $twig, $col ) = @_;
- $column_widths[ $_ - 1 ] = $col->att('width')
- for ( $col->att('min') .. $col->att('max') );
+ for my $colnum ($col->att('min')..$col->att('max')) {
+ $column_widths[$colnum - 1] = $col->att('width');
+ $column_formats[$colnum - 1] = $col->att('style');
+ }
$twig->purge;
},
@@ -227,6 +230,14 @@ sub _parse_sheet {
$twig->purge;
},
+ 'sheetPr/tabColor' => sub {
+ my ( $twig, $tab_color ) = @_;
+
+ $sheet->{TabColor} = $self->_color($sheet->{_Book}{Color}, $tab_color);
+
+ $twig->purge;
+ },
+
}
);
@@ -327,6 +338,7 @@ sub _parse_sheet {
$sheet->{ColWidth} = [
map { defined $_ ? 0+$_ : 0+$default_column_width } @column_widths
];
+ $sheet->{ColFmtNo} = \@column_formats;
}