FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Rectangle in Excel (Solved)
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Rectangle in Excel (Solved)
Posted: Sun Oct 27, 2019 04:25 PM

Hello,

From my FWH-application, I want to draw a rectangle around a certain number of cells.
How can I accomplish that?

Thanks a lot for any help.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: Rectangle in Excel
Posted: Sun Oct 27, 2019 05:33 PM
Michel:

I hope this can help you

Code (fw): Select all Collapse
// lines style
#Define xlContinuous 1
#Define xlDash -4115
#Define xlDashDot 4
#Define xlDashDotDot 5
#Define xlDot -4118
#Define xlDouble -4119
#Define xlSlantDashDot 13
#Define xlLineStyleNone -4142

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

#define xlThick 4
#define xlMedium -4138
….
….
……
….
….
    oSheet:Cells(nRow,nCol):Borders(xlEdgeLeft):LineStyle := xlContinuous
    oSheet:Cells(nRow,nCol):Borders(xlEdgeLeft):Weight := xlThick
    oSheet:Cells(nRow,nCol):Borders(xlEdgeTop):LineStyle := xlContinuous
    oSheet:Cells(nRow,nCol):Borders(xlEdgeTop):Weight := xlThick
    oSheet:Cells(nRow,nCol):Borders(xlEdgeRight):LineStyle := xlContinuous
    oSheet:Cells(nRow,nCol):Borders(xlEdgeRight):Weight := xlThick
    oSheet:Cells(nRow,nCol):Borders(xlEdgeBottom):LineStyle := xlContinuous
    oSheet:Cells(nRow,nCol):Borders(xlEdgeBottom):Weight := xlThick


That's all.

Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Rectangle in Excel
Posted: Sun Oct 27, 2019 06:02 PM

Waaw,

Great. Thank you so much for your help.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Continue the discussion