Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Excel Color Palette

by Courage (Parson)
on Aug 05, 2005 at 12:15 UTC ( [id://481216]=note: print w/replies, xml ) Need Help??


in reply to Excel Color Palette

Here is my one-liner to get an idea:
# ЭКСЕЛ -- ГАД И + ОКРУГЛЯЕТ &#10 +62;ВЕТ!!!!!!!!!!!!!!!! perl -MOLE -we "e->Selection->{Interior}->{Color}=245*256*256+255*256+ +255;print e->Selection->{Interior}->{Color}"
Unreadable comment is my untranslatable from Russian comments on how excel rounds color numbers.

Helper OLE.pm module is trivial:

#simple helper for oneliner to get active word, excel #package OLE; use Win32::OLE qw(CP_UTF8); Win32::OLE->Option(CP=>CP_UTF8); sub e { return Win32::OLE->GetActiveObject('Excel.Application'); } sub w { return Win32::OLE->GetActiveObject('Word.Application'); } sub ao { return Win32::OLE->GetActiveObject(shift); } 1;

Best regards,
Courage, the Cowardly Dog

Replies are listed 'Best First'.
Re^2: Excel Color Palette
by jmcnamara (Monsignor) on Aug 05, 2005 at 12:26 UTC

    That sets the cell colour.

    However, the OP wishes to change the palette colour, i.e. the definition of the colour associated with a workbook colour index.

    --
    John.

      John and Courage, Thanks for the replies. Yes, correct John I was hoping to change the definition of the colour palette itself. Your code example does seem to prove that it it will probably never work. Oh well, monochrome it is then. :-( Cheers! Brett

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-24 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found