473,944 Members | 2,982 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\Li b\site-packages\win32c om\client\__ini t__.py", line
95, in
Dispatch
dispatch, userName = dynamic._GetGoo dDispatchAndUse rName(dispatch, userName,c
lsctx)
File "C:\Python24\Li b\site-packages\win32c om\client\dynam ic.py", line
98, in _
GetGoodDispatch AndUserName
return (_GetGoodDispat ch(IDispatch, clsctx), userName)
File "C:\Python24\Li b\site-packages\win32c om\client\dynam ic.py", line
78, in _
GetGoodDispatch
IDispatch = pythoncom.CoCre ateInstance(IDi spatch, None, clsctx, pythoncom.II
D_IDispatch)
pywintypes.com_ error: (-2147221005,
'\xce\xde\xd0\x a7\xb5\xc4\xc0\ xe0\xb1\xf0\xd7 \xd6\xb7\xfb\xb 4\xae',
None, None)
Mar 13 '08 #1
2 5777
On Mar 13, 1:02 am, lialie <lia...@gmail.c omwrote:
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\Li b\site-packages\win32c om\client\__ini t__.py", line
95, in
Dispatch
dispatch, userName = dynamic._GetGoo dDispatchAndUse rName(dispatch, userName,c
lsctx)
File "C:\Python24\Li b\site-packages\win32c om\client\dynam ic.py", line
98, in _
GetGoodDispatch AndUserName
return (_GetGoodDispat ch(IDispatch, clsctx), userName)
File "C:\Python24\Li b\site-packages\win32c om\client\dynam ic.py", line
78, in _
GetGoodDispatch
IDispatch = pythoncom.CoCre ateInstance(IDi spatch, None, clsctx, pythoncom.II
D_IDispatch)
pywintypes.com_ error: (-2147221005,
'\xce\xde\xd0\x a7\xb5\xc4\xc0\ xe0\xb1\xf0\xd7 \xd6\xb7\xfb\xb 4\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.c omwrote:
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\x a7\xb5\xc4\xc0\ xe0\xb1\xf0\xd7 \xd6\xb7\xfb\xb 4\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.enco ding

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
7930
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 the place and have been unable to figure out exactly what the :: means or does ? It does not appear to explain it in Programming PHP by O'Reilly, or I have been unable to find it in
2
46841
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 triggered SQL statement in trigger "OLGCWEB.TBLPROPS_INS_TRG". Information returned for the error includes SQLCODE "-811", SQLSTATE "21000" and message tokens "". SQLSTATE=09000 2006-08-31 16:33:35,139 ERROR...
0
2356
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 DiagnosticEvent objects for processing. I've altered the main program for the service slightly so that I can run it more easily as a "regular" application during debugging. I have an assembly that contains the "diagnostics" classes that do the work, the...
3
1769
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 on it, as an example of what a "real life" __metaclass__ might do for those who may never have seen such a thing themselves. http://markshroyer.com/blog/2007/11/09/tilting-at-metaclass-windmills/ So what's the verdict? Incorrect? Missed the...
5
13416
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 http://mghospedagem.com/images/controlpanel.jpg instead of http://mghospedagem.comhttp://mghospedagem.com/images/controlpanel.jpg As u see, there's the website URL before the image URL.
0
10143
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11543
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11134
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10671
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9868
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8234
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7396
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6313
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4918
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 we have to send another system

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.