473,513 Members | 2,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dispatch("Excel.Application") failed

Hi,
Maybe it 's quite simple, but I can't fix it. Do I make some mistakes in
my env setting? My excel version is 2003.
any suggestion? Thanks.

Traceback (most recent call last):
File "testexcel.py", line 3, in ?
excel = Dispatch("Excel.Application")
File "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line
95, in
Dispatch
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userN ame,c
lsctx)
File "C:\Python24\Lib\site-packages\win32com\client\dynamic.py", line
98, in _
GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "C:\Python24\Lib\site-packages\win32com\client\dynamic.py", line
78, in _
GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.II
D_IDispatch)
pywintypes.com_error: (-2147221005,
'\xce\xde\xd0\xa7\xb5\xc4\xc0\xe0\xb1\xf0\xd7\xd6\ xb7\xfb\xb4\xae',
None, None)
Mar 13 '08 #1
2 5713
On Mar 13, 1:02 am, lialie <lia...@gmail.comwrote:
Hi,
Maybe it 's quite simple, but I can't fix it. Do I make some mistakes in
my env setting? My excel version is 2003.
any suggestion? Thanks.

Traceback (most recent call last):
File "testexcel.py", line 3, in ?
excel = Dispatch("Excel.Application")
File "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line
95, in
Dispatch
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userN ame,c
lsctx)
File "C:\Python24\Lib\site-packages\win32com\client\dynamic.py", line
98, in _
GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "C:\Python24\Lib\site-packages\win32com\client\dynamic.py", line
78, in _
GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.II
D_IDispatch)
pywintypes.com_error: (-2147221005,
'\xce\xde\xd0\xa7\xb5\xc4\xc0\xe0\xb1\xf0\xd7\xd6\ xb7\xfb\xb4\xae',
None, None)
I'm not seeing anything obviously wrong. What version of Windows are
you using? Are you logged in as an admin?

You also might try the PyWin32 user's mailing list:
http://mail.python.org/mailman/listinfo/python-win32

Mike
Mar 13 '08 #2
On Mar 13, 5:02 pm, lialie <lia...@gmail.comwrote:
Hi,
Maybe it 's quite simple, but I can't fix it. Do I make some mistakes in
my env setting? My excel version is 2003.
any suggestion? Thanks.

Traceback (most recent call last):
File "testexcel.py", line 3, in ?
excel = Dispatch("Excel.Application")
[snip]
pywintypes.com_error: (-2147221005,
'\xce\xde\xd0\xa7\xb5\xc4\xc0\xe0\xb1\xf0\xd7\xd6\ xb7\xfb\xb4\xae',
None, None)
Googling for 2147221005 gives some clues.

That string of hex stuff appears where an error message is expected --
it's not utf8, and makes no sense when I attempt to decode it with
cp1250 to cp1258 inclusive. If you start IDLE and type:

import sys; sys.stdout.encoding

what do you see?
Mar 13 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
7913
by: Charon | last post by:
I see two colons in the middle of what look like method calls here and there. Such as when using PEAR // implement pear db object $this->_oConn =& DB::connect(DSN); I have looked all over...
2
46678
by: Richard | last post by:
Our web programmer was looking in his application log an found the following error: 2006-08-31 16:33:35,129 ERROR org.hibernate.util.JDBCExceptionReporter - < SQL0723N An error occurred in a...
0
2191
mmfranke
by: mmfranke | last post by:
Hello. Hi. I'm writing a logging service that uses .NET remoting. The idea is that the service publishes an EventProcessor object that clients can access via .NET Remoting, passing it...
3
1749
by: Mark Shroyer | last post by:
I guess this sort of falls under the "shameless plug" category, but here it is: Recently I used a custom metaclass in a Python program I've been working on, and I ended up doing a sort of write-up...
5
13305
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7521
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5682
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5084
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1591
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.