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.
_______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32