Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Border and line with excel
Message
De
20/10/2011 13:56:07
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Border and line with excel
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01526984
Message ID:
01526984
Vues:
99
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform