win32com and MS Excel

Serge Terekhoff alife at narod.ru
Mon Feb 18 05:51:02 EST 2002


Dear all!

on
from win32com.client import Dispatch

My Python2.2 replies:

Traceback (most recent call last):
  File "F:\Users\Serge\MyPy\to_excel.py", line 1, in ?
    from win32com.client import Dispatch
ImportError: No module named win32com.client


What i did wrong?

Thank you
Serge





"Jimmy Retzlaff" <jimmy at retzlaff.com> wrote in message news:<mailman.1013967115.15656.python-list at python.org>...
> > 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-598
> 85.
> 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