Page 1 of 1

Right Cell Border in MS-Excel

PostPosted: Sat Mar 11, 2006 3:48 am
by Jeff Barnes
Hi Everybody,

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

Thanks,

Jeff

Re: Right Cell Border in MS-Excel

PostPosted: Sat Mar 11, 2006 11:36 am
by Enrico Maria Giordano
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

PostPosted: Sun Mar 12, 2006 10:47 pm
by Jeff Barnes
Thanks Enrico