Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
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 ( [id://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?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 12:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found