in reply to ParseExcel - need background color info


Here is a small example. Uncomment the Dumper line to see the full Cell data structure.
#!/usr/bin/perl -wl use strict; use Spreadsheet::ParseExcel; use Data::Dumper; my $parse_excel = Spreadsheet::ParseExcel->new(); my $workbook = $parse_excel->Parse('parse.xls'); for my $worksheet (@{$workbook->{Worksheet}}) { if (defined $worksheet->{MaxRow}) { for (my $row = $worksheet->{MinRow}; $row <= $worksheet->{MaxRow}; $row++) { for (my $col = $worksheet->{MinCol}; $col <= $worksheet->{MaxCol}; $col++) { my $cell = $worksheet->{Cells}[$row][$col]; my $pattern = $cell->{Format}->{Fill}->[0]; my $fg_color = $cell->{Format}->{Fill}->[1]; my $bg_color = $cell->{Format}->{Fill}->[2]; print "Row, Col = ($row, $col)"; print "Value = ", $cell->Value(); print "Fill = [$pattern, $fg_color, $bg_color] +\n"; #print Dumper $cell; } } } }

--
John.