I don't know why your code doesn't work. But I know that this does (here I am generating a new workbook, not opening an old one).
excel = Dispatch('Excel.Application') excel.Visible = 0 excel.Workbooks.Add() excel.Worksheets(1).Activate() excel.ActiveWorkbook.SaveAs(file) ...do a bunch of stuff excel.ActiveWorkbook.Save() excel.Quit() del(excel) > from win32com.client import Dispatch > > #Open the sheet. > xl_app= Dispatch("Excel.Application") > xl_book= xl_app.Workbooks.Open(<filename>) > > #Close the sheet and exit the app. > xl_book.Close() > xl_app.Quit() > del xl_app > > This leaves 'Excel' in the process list. How can I get rid of it? --karl http://www.livingskies.com/ _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32