Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel Automation Formatting and F9
Message
De
26/02/2010 00:17:36
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01372023
Message ID:
01451145
Vues:
51
Hi,
I add the code to my program, but it NOT insert the line at the beginning of the row 1.
oExcel = CREATEOBJECT([Excel.Application])
oWorkbook = oExcel.Workbooks.open("C:\WTS\MID\WTS77XLS.XLS")
oExcel.Visible = .t.
oExcel.activesheet.Range("A1").value = "Client Code"
oExcel.activesheet.Range("B1").value = "Client Name"
oExcel.activesheet.Range("C1").value = "Invoice No."
oExcel.activesheet.Range("D1").value = "Amount"
lnLastRow = oExcel.activesheet.UsedRange.Rows.Count
 lnLastCol = oExcel.activesheet.UsedRange.Columns.Count
oExcel.activesheet.Range("D2:D"+TRIM(PADR(lnLastRow+1,11))).NumberFormat ='###,###,###.00' 
oExcel.activesheet.ROWS("1:1").INSERT(xlShiftDown)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform