Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Excel 2007
Message
 
To
22/10/2008 13:22:21
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01356362
Message ID:
01356365
Views:
20
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform