in reply to How to use Spreadsheet-ParseExcel-0.2602 to extract the bgcolor of each cell
Sorry, this piece of code is untested.
foreach my $oWkS (@{$oBook->{Worksheet}}) { for(my $iR = $oWkS->{MinRow} ; defined $oWkS->{MaxRow} && $iR <= +$oWkS->{MaxRow} ; $iR++) { for(my $iC = $oWkS->{MinCol} ; defined $oWkS->{MaxCol} && $i +C <= $oWkS->{MaxCol} ; $iC++) { $oWkC = $oWkS->{Cells}[$iR][$iC]; my $Fill = $oWkC-{Format}->{Fill}; } } }
$Fill will contain an array ref to a fill pattern.
According to the documentation: $Fill->[0] = *Pattern* $Fill->[1] = *Front Color* $Fill->[2] = *Color*
You can access other things like Border, Font, etc.
my $Border = $oWkC-{Format}->{BdrStyle}; my $Font = $oWkC-{Format}->{Font}; . . . and so on
In Section
Seekers of Perl Wisdom