Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with Excel 2007
Message
 
À
22/10/2008 13:22:21
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01356362
Message ID:
01356365
Vues:
19
>Hello
>This code has been working ok in Excel 2003, but fails where indicated in Excel 2007 with "OLE error code 0x80020005: Data type mismatch"
>
>...
>copy to (Thisform.Ascii) Xl5
>...
>oE = Createobject("Excel.Application")
>oE.Workbooks.Open(Thisform.Ascii)
>oHoja = oE.Workbooks(1).Sheets(1)
>oHoja.Range("A1") = "Legajo"
>oHoja.Range("B1") = "Apellido, nombre"
>....
>oHoja.Rows("1").RowHeight = 60
>oHoja.Columns("C:ZZ").ColumnWidth = 15 && ******this line  fails in excel 2007
>oHoja.Rows("1").VerticalAlignment = 3
>....
>
>
>Any ideas?
>TIA

I have no problems with this:
oE = Createobject("Excel.Application")
oE.Visible = .t.
oE.Workbooks.Add()
oe.Columns("C:ZZ").ColumnWidth = 15
oe.Columns("C:ZZ").ColumnWidth = 1

oe.ActiveSheet.Columns("C:ZZ").ColumnWidth = 15
oe.ActiveSheet.Columns("C:ZZ").ColumnWidth = 1
oe.ActiveSheet.Columns("C:ZZ").ColumnWidth = 15
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform