[python-win32] Excel Saving

Jeff Shannon jeff@ccvcorp.com
Wed, 23 Jan 2002 10:13:24 -0800


> "Sayed A. Kooshesh" <sakoosh@uark.edu> wrote:
>
> xl.ActiveWorkbook.SaveAs(file, win32com.client.constants.xlNormal, '', '',
> 0, 0)
> #it always pops up the dialog box that that File already Exists in this
> location as does
> xl.Save(file)
> #end loop
> xl.Quit()
>
> Is there any way to make these dialog boxes not appear?

Have you tried just using Save() with no filename?

xl.ActiveWorkbook.Save()

If that still doesn't work, then try searching through the Excel
helpfiles--there's quite a bit of documentation on their object model there,
though of course it's focused at Visual Basic use, but it's not that hard to
translate.  Look for a flag that's passed to Save or SaveAs, that specifies
whether to request confirmation or not.

Jeff Shannon
Technician/Programmer
Credit International