Right Cell Border in MS-Excel

Post Reply
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Right Cell Border in MS-Excel

Post by Jeff Barnes »

Hi Everybody,

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

Thanks,

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

Re: Right Cell Border in MS-Excel

Post by Enrico Maria Giordano »

This is a working sample:

Code: Select all

#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
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Post by Jeff Barnes »

Thanks Enrico
Post Reply