Go Back   Velocity Reviews > Newsgroups > PERL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

PERL - Win32::OLE, Excel, and coloring

 
Thread Tools Search this Thread
Old 06-24-2003, 08:37 PM   #1
Default Win32::OLE, Excel, and coloring


Hello,

I've been using ActiveState's ActivePerl to generate Excel
spreadsheets using the Win32::OLE module. The rudimentary examples
that are out there on the web show the way to set up specific ranges
and enter data into cells, but what I'm looking for at this point is
how to set the background color of cells.

Does anybody know how to do this with Win32::OLE? If this module maps
to Microsoft's API, is there any complete documentation out there
about which hash keys inside of range or cell objects map to which
features in the application?

Any help would be appreciated.


M. David Allen
  Reply With Quote
Old 06-25-2003, 12:38 AM   #2
Jay Tilton
 
Posts: n/a
Default Re: Win32::OLE, Excel, and coloring

(M. David Allen) wrote:

: I've been using ActiveState's ActivePerl to generate Excel
: spreadsheets using the Win32::OLE module. The rudimentary examples
: that are out there on the web show the way to set up specific ranges
: and enter data into cells, but what I'm looking for at this point is
: how to set the background color of cells.
:
: Does anybody know how to do this with Win32::OLE?

# $range is a Range object within a Worksheet object
$range->Interior->{ColorIndex} = 6; # 6 == yellow

: If this module maps to Microsoft's API,

The application's class is the interface. Win32::OLE just gives Perl
access to the class.

: is there any complete documentation out there
: about which hash keys inside of range or cell objects map to which
: features in the application?

Objects, their methods, and their properties are described in the
Excel VBA documentation. All you have to do is mentally alter VBA
syntax into Perl syntax--the Synopsis section of the Win32::OLE pod
gives good clues on that.

  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump