Excel and FWH (Save As, Font Color, Cell shading)

Excel and FWH (Save As, Font Color, Cell shading)

Postby cdmmaui » Thu Apr 06, 2006 12:19 am

Hello,

I am using the great example provided by Milan and I need add the following functionality.

1) Perform Save As without dialog box
2) Change font color
3) Change cell shading

Can anyone help?

Sincerely,
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: Excel and FWH (Save As, Font Color, Cell shading)

Postby Enrico Maria Giordano » Thu Apr 06, 2006 11:13 am

This is a working sample:

Code: Select all  Expand view  RUN
FUNCTION MAIN()

    LOCAL oExcel := CREATEOBJECT( "Excel.Application" )

    LOCAL oWorkBook := oExcel:WorkBooks:Add()

    LOCAL oSheet := oExcel:ActiveSheet

    oSheet:Cells( 1, 1 ):Value = "This is a test"
    oSheet:Cells( 1, 1 ):Font:Color = 255
    oSheet:Cells( 1, 1 ):Interior:Color = 11184810
    oSheet:Cells( 1, 1 ):Font:Shadow = .T.

    oWorkBook:SaveAs( "c:\xharbour\newfile.xls" )

    oExcel:Quit()

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby cdmmaui » Thu Apr 06, 2006 3:17 pm

Thank you Enrico. Where can I find a table with the numerical values of the colors?

Sincerely,
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Postby Enrico Maria Giordano » Thu Apr 06, 2006 4:02 pm

Paint, Colors, Modify colors, Custom colors. Then look at the three color numeric components.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 34 guests