Right Cell Border in MS-Excel

Right Cell Border in MS-Excel

Postby Jeff Barnes » Sat Mar 11, 2006 3:48 am

Hi Everybody,

Does anyone know how to set only the right cell border in excel via fwh / ole ?

Thanks,

Jeff
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Right Cell Border in MS-Excel

Postby Enrico Maria Giordano » Sat Mar 11, 2006 11:36 am

This is a working sample:

Code: Select all  Expand view
#include "Fivewin.ch"


// Line styles

#define xlContinuous        1
#define xlDash          -4115
#define xlDashDot           4
#define xlDashDotDot        5
#define xlDot           -4118
#define xlDouble        -4119
#define xlSlantDashDot     13
#define xlLineStyleNone -4142


// Border positions

#define xlEdgeLeft    7
#define xlEdgeTop     8
#define xlEdgeBottom  9
#define xlEdgeRight  10



FUNCTION MAIN()

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

    LOCAL oSheet

    oExcel:Workbooks:Add()

    oSheet = oExcel:ActiveSheet()

    oSheet:Range( "A1" ):Borders( xlEdgeRight ):LineStyle = xlContinuous
    oSheet:Range( "A1" ):Borders( xlEdgeRight ):Color = CLR_RED
    oSheet:Range( "A1" ):Value = "Red"

    oExcel:Visible = .T.

    RETURN NIL


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

Postby Jeff Barnes » Sun Mar 12, 2006 10:47 pm

Thanks Enrico
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 59 guests