Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE to Excel
Message
 
To
02/10/1998 09:17:59
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00142588
Message ID:
00143208
Views:
30
>>
>>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"

You can download a file from my website which has the constants for all Office97 products. There may be a copy here as well, thanks to Menachem Bazian who wrote a program to extract them.
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Previous
Reply
Map
View

Click here to load this message in the networking platform