diff options
author | Fitz Elliott <felliott@fiskur.org> | 2014-07-05 11:14:11 -0400 |
---|---|---|
committer | Fitz Elliott <felliott@fiskur.org> | 2014-07-05 12:17:48 -0400 |
commit | c4c84e8055f67738d0f9b6ae30d1d844c6fc46a4 (patch) | |
tree | 7d850e0208173e665984607ca2a900cad0db8a3d /lib/Spreadsheet/ParseXLSX.pm | |
parent | 61ed182ace7b7ac06a00b0bb9d572cc464b43493 (diff) | |
download | spreadsheet-parsexlsx-c4c84e8055f67738d0f9b6ae30d1d844c6fc46a4.tar.gz spreadsheet-parsexlsx-c4c84e8055f67738d0f9b6ae30d1d844c6fc46a4.zip |
add ColFmtNo support to ParseXLSX
Diffstat (limited to 'lib/Spreadsheet/ParseXLSX.pm')
-rw-r--r-- | lib/Spreadsheet/ParseXLSX.pm | 8 |
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; } |