closing excel application

Hung Jung Lu hungjunglu at yahoo.com
Mon Oct 20 03:12:20 EDT 2003


hungjunglu at yahoo.com (Hung Jung Lu) wrote in message 
> 
> import win32com.client
> import pythoncom
> app = win32com.client.Dispatch('Excel.Application')
> app.Visible = 1
> ...
> print pythoncom._GetInterfaceCount()
> app = None
> print pythoncom._GetInterfaceCount()
> pythoncom.CoUninitialize()

Sorry, missed the line app.Quit() before the first print statement.

import win32com.client
import pythoncom
app = win32com.client.Dispatch('Excel.Application')
app.Visible = 1
...
app.Quit()
print pythoncom._GetInterfaceCount()
app = None
print pythoncom._GetInterfaceCount()
pythoncom.CoUninitialize()

Hung Jung




More information about the Python-list mailing list