From 8b8bc05347926db2b89a3fc8b782b41bbdf6f1aa Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 4 Jun 2013 12:58:17 -0500 Subject: support fill patterns --- lib/Spreadsheet/ParseXLSX.pm | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'lib/Spreadsheet/ParseXLSX.pm') diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm index 33b0d06..c140811 100644 --- a/lib/Spreadsheet/ParseXLSX.pm +++ b/lib/Spreadsheet/ParseXLSX.pm @@ -236,9 +236,31 @@ sub _parse_styles { thin => 1, ); + my %fill = ( + darkDown => 7, + darkGray => 3, + darkGrid => 9, + darkHorizontal => 5, + darkTrellis => 10, + darkUp => 8, + darkVertical => 6, + gray0625 => 18, + gray125 => 17, + lightDown => 13, + lightGray => 4, + lightGrid => 15, + lightHorizontal => 11, + lightTrellis => 16, + lightUp => 14, + lightVertical => 12, + mediumGray => 2, + none => 0, + solid => 1, + ); + my @fills = map { [ - 0, # XXX + $fill{$_->att('patternType')}, $self->_color($workbook->{Color}, $_->first_child('fgColor')), $self->_color($workbook->{Color}, $_->first_child('bgColor')), ] -- cgit v1.2.3-54-g00ecf