>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.