win32com and MS Excel
Jimmy Retzlaff
jimmy at retzlaff.com
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
speed
> 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:
http://groups.google.com/groups?hl=en&selm=9e1a14%24ilo5%241%40ID-59885.
news.dfncis.de
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
(e.g., Excel.py)
- Change these two lines:
from win32com.client import Dispatch
xlApp = Dispatch("Excel.Application")
to:
import Excel
xlApp = Excel.Application()
Jimmy
More information about the Python-list
mailing list