Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A save file problem with automation (Excel)
Message
From
02/01/2007 08:21:20
 
 
To
02/01/2007 05:15:45
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01181303
Message ID:
01181342
Views:
9
>Hi everybody!
>Before, I use the following codes to save an active sheet.
>xl.APPLICATION.ActiveWorkbook.SAVE
>
>These codes were good with MS Excel 2003 or previous version. However, that do not work with MS Excel 2007. I got error information:
>“OLE Idispatch exception code 0 from Microsoft office Excel: Unable to get the Save property of Workbook class”
>

It works for me here in Excel 2007. What do you have your default file type set up as, 2007 or 2003 format? (Mine is set to 97/2003 compatibility mode)
oExcel = createobject("excel.application")
oExcel.Workbooks.Add
oExcel.Cells(1,1).Value = "foo"
oExcel.APPLICATION.ActiveWorkbook.SAVE
oExcel.Visible = .t.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform