FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Excel and FWH (Save As, Font Color, Cell shading)
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Excel and FWH (Save As, Font Color, Cell shading)
Posted: 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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Excel and FWH (Save As, Font Color, Cell shading)
Posted: Thu Apr 06, 2006 11:13 AM
This is a working sample:

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
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Excel and FWH (Save As, Font Color, Cell shading)
Posted: Thu Apr 06, 2006 03: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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Excel and FWH (Save As, Font Color, Cell shading)
Posted: Thu Apr 06, 2006 04:02 PM

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

EMG

Continue the discussion