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

Post Reply
User avatar
cdmmaui
Posts: 653
Joined: Fri Oct 28, 2005 9:53 am
Location: The Woodlands - Dallas - Scottsdale - London
Contact:

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

Post by cdmmaui »

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
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

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

Post by Enrico Maria Giordano »

This is a working sample:

Code: Select all

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
cdmmaui
Posts: 653
Joined: Fri Oct 28, 2005 9:53 am
Location: The Woodlands - Dallas - Scottsdale - London
Contact:

Post by cdmmaui »

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
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

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

EMG
Post Reply