Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A save file problem with automation (Excel)
Message
De
02/01/2007 08:21:20
 
 
À
02/01/2007 05:15:45
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01181303
Message ID:
01181342
Vues:
10
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform