Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Border and line with excel
Message
From
20/10/2011 13:56:07
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Border and line with excel
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01526984
Message ID:
01526984
Views:
98
I was able to automate a file in excel with seems great as bold title etc however I just want to know how I can apply a border line
here is the code
Thank's a lot

local loExcel, oSheet
loExcel = CREATEOBJECT("Excel.Application") && Create the Excel object
opexcel = FULLPATH("myfile.xls")
loWorkbook = loExcel.workbooks.open("&opexcel") && parameters to open the file from the right directory
loExcel.Visible = .T. && display Excel


oSheet = loExcel.ActiveSheet

lnRow = 5

lnRow = 1
lnCol = 1
oSheet.Range([A1]).Select
oSheet.Cells(lnRow,lnCol).Value = [Brand]
oSheet.Cells(lnRow,lnCol).Font.Bold = .T.
oSheet.Cells(lnRow,lnCol).HorizontalAlignment = 3

lnCol = lnCol + 1
* oSheet.Range([B1]).Select
oSheet.Cells(lnRow,lnCol).Value = [Model]
oSheet.Cells(lnRow,lnCol).Font.Bold = .T.
oSheet.Cells(lnRow,lnCol).HorizontalAlignment = 3

lnRow = 4
lnBeginRange = lnRow
Next
Reply
Map
View

Click here to load this message in the networking platform