Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: How to use Spreadsheet-ParseExcel-0.2602 to extract the bgcolor of each cell

by young_david (Friar)
on Dec 10, 2003 at 17:52 UTC ( #313790=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://313790]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2023-01-31 16:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?