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.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm
index 2aecac3..9fd3f79 100644
--- a/lib/Spreadsheet/ParseXLSX.pm
+++ b/lib/Spreadsheet/ParseXLSX.pm
@@ -136,6 +136,7 @@ sub _parse_sheet {
my @merged_cells;
+ my @column_formats;
my @column_widths;
my @row_heights;
@@ -195,8 +196,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;
},
@@ -334,6 +337,7 @@ sub _parse_sheet {
$sheet->{ColWidth} = [
map { defined $_ ? 0+$_ : 0+$default_column_width } @column_widths
];
+ $sheet->{ColFmtNo} = \@column_formats;
}