[python-win32] pywintypes.com_error: (-2147221164
WangMengNan(桌面事业部)
wangmengnansi1045 at sogou-inc.com
Sun Dec 15 12:37:40 CET 2013
Hi,All:
Sorry to bother you.
I have a python2.7 program,my pc's environment is win7,32bit.I want to use win32com,and I have installed
win32com for python2.7. When I worte the code"xls = client.Dispatch("Excel.Application")",an error happened:
Traceback (most recent call last):
File "D:\JackieCodeProject\python\newvenus\excel_yanxiaoqing.py", line 168, in <module>
write_to_mysql(r'C:\V4.2.xlsx',"王梦楠",1294)
File "D:\JackieCodeProject\python\newvenus\excel_yanxiaoqing.py", line 76, in write_to_mysql
case_list = getlist_from_excel(file_name)
File "D:\JackieCodeProject\python\newvenus\excel_yanxiaoqing.py", line 27, in getlist_from_excel
xls = client.Dispatch("Excel.Application")
File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 108, in _GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 85, in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
pywintypes.com_error: (-2147221164, '\xc3\xbb\xd3\xd0\xd7\xa2\xb2\xe1\xc0\xe0', None, None)
I need you help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20131215/ce61c47f/attachment.html>
More information about the python-win32
mailing list