Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE to Excel
Message
From
02/10/1998 09:17:59
 
 
To
30/09/1998 17:35:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00142588
Message ID:
00143200
Views:
25
>
>What is the value of xlEdgeTop? Not sure this syntax
>will port to VFP. anyone know how to draw a solid
>line through a selected area in Excel using VFP?

I also needed to find out the value of xlEdgeTop but was unsuccessful

Instead, I found that the following code works:

oSprd=CREATEOBJECT("Excel.Sheet")
oSprd.Application.Visible = .T.
oSprd.Application.Columns("C:C").ColumnWidth = 20
oSprd.Application.Cells(2,3).Value = "bold centered text"
oSprd.Application.Cells(2,3).font.bold = .T.

* Center the text in row 2 column 3
* xlCenter = -4108
* oSprd.Application.Cells(2,3).HorizontalAlignment = -4108
oSprd.Application.range("B2:D2").HorizontalAlignment = -4108


* Draw borders around B2:D7 the hard way

* xlTop = -4160
oSprd.Application.range("B2:D2").borders(-4160).linestyle = 1

* xlLeft = -4131
oSprd.Application.range("B2:B7").borders(-4131).linestyle = 1

* xlBottom = -4107
oSprd.Application.range("B7:D7").borders(-4107).linestyle = 1

* xlRight = -4152
oSprd.Application.range("D2:D7").borders(-4152).linestyle = 1

WAIT WINDOW "PRESS ENTER"
__________________________________________________
Mesa Vista Software (david@mesa-vista.com)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform