Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to format the cell borders of an Excel spreadsheet Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
25-Oct-02
Category
OLE
Language
Delphi 2.x
Views
105
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Jonas Bilinkevicius

How to format the cell borders of an Excel spreadsheet

Answer:

Various ways of setting borders on a worksheet (WS):

1   { ... }
2   var
3     Rng: OleVariant;
4     LeftEdge: Border;
5   { ... }
6   WS.Range['A5', 'D5'].Borders.Item[xlEdgeTop].Weight := xlThick;
7   WS.Range['A5', 'D5'].Borders.Item[xlEdgeTop].Color := clYellow;
8   WS.Range['A5', 'D5'].Borders.Item[xlEdgeBottom].Linestyle := xlDouble;
9   WS.Range['A5', 'D5'].Borders.Item[xlEdgeBottom].Color := clYellow;
10  { ... }
11  
12  { ... }
13  WS.Evaluate('B6, C6, D6, E6, F6').Borders.Item[xlEdgeLeft].Line
14  style := xlContinuous;
15  Rng := WS.Range['A1', 'A1'];
16  Rng.BorderAround(xlContinuous, xlThin, Color := clFuchsia);
17  LeftEdge := WS.Range['B2', 'B5'].Borders.Item[xlEdgeLeft];
18  LeftEdge.Linestyle := xlContinuous;
19  LeftEdge.Weight := 3;
20  LeftEdge.Color := clLime;
21  { ... }


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC