win32com and MS Excel

Jimmy Retzlaff jimmy at
Sun Feb 17 12:30:13 EST 2002

> One more question: what is going to happen when I build a standalone 
> (using py2exe)? Will the generated file be included and affect the
> on another machine too?

There are a couple of options. There is a py2exe option to include
everything makepy has ever generated on the build machine, see:

The approach I've used is as follows:

- Find the file generated by makepy (it's in win32com\gen_py)
- Copy that to your application directory and give it a readable name
- Change these two lines:

from win32com.client import Dispatch
xlApp = Dispatch("Excel.Application")


import Excel
xlApp = Excel.Application()


More information about the Python-list mailing list