473,583 Members | 3,097 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

why would 'import win32com' fail?

All,

I am trying to access Excel from Python. Many of the examples started
with:

import win32com
....
blah, blah

I try that from my Python shell and it fails. What am I missing here?
TIA,

Bill
Oct 23 '08 #1
5 5780
On Thu, Oct 23, 2008 at 12:21 PM, bill <wg****@draper. comwrote:
All,

I am trying to access Excel from Python. Many of the examples started
with:

import win32com
....
blah, blah

I try that from my Python shell and it fails. What am I missing here?
It's not a standard library module. You'll need to install it from:
http://python.net/crew/mhammond/win32/Downloads.html

Cheers,
Chris
--
Follow the path of the Iguana...
http://rebertia.com
>

TIA,

Bill
--
http://mail.python.org/mailman/listinfo/python-list
Oct 23 '08 #2
On Thu, 23 Oct 2008 12:21:29 -0700, bill wrote:
I am trying to access Excel from Python. Many of the examples started
with:

import win32com
....
blah, blah

I try that from my Python shell and it fails. What am I missing here?
The `win32com` module? It is not part of the standard library.

Ciao,
Marc 'BlackJack' Rintsch
Oct 23 '08 #3
On Oct 23, 2:21*pm, bill <wgr...@draper. comwrote:
All,

I am trying to access Excel from Python. Many of the examples started
with:

* * * import win32com
* * * ....
* * * blah, blah

I try that from my Python shell and it fails. What am I missing here?

TIA,

Bill
Dunno. Does it give a traceback? Does the interpreter just die? Or
what? My guess is you need to uninstall Pywin32 and then reinstall it.
I've seen it get goofy like this when I upgrade Pywin32 too.

Mike
Oct 23 '08 #4
On Oct 23, 3:21*pm, bill <wgr...@draper. comwrote:
All,

I am trying to access Excel from Python. Many of the examples started
with:

* * * import win32com
* * * ....
* * * blah, blah

I try that from my Python shell and it fails. What am I missing here?
You need to download and install the Python Extensions for Windows.

http://sourceforge.net/project/showf...group_id=78018
Oct 23 '08 #5
On Oct 23, 3:21*pm, bill <wgr...@draper. comwrote:
All,

I am trying to access Excel from Python. Many of the examples started
with:

* * * import win32com
* * * ....
* * * blah, blah

I try that from my Python shell and it fails. What am I missing here?

TIA,

Bill

Thanks for the responses. I did not realize it had to be downloaded.

Bill
Oct 23 '08 #6

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

Similar topics

5
3964
by: Brian Hlubocky | last post by:
I'm have a fairly simple (in terms of COM) python program that pulls info from an Access database and creates Outlook contacts from that information. It uses wxPython for gui and works without problems. I want to be able to distribute this program using py2exe, but I am having some problems. I am using a simple setup.py like in the...
4
1650
by: Achim Domma (Procoders) | last post by:
Hi, in my __init__.py of module A.B if have something like: from win32com.client import Dispatch obj=Dispatch('...') VERSION=tuple() del obj Now I should be able to write:
1
8169
by: mark | last post by:
In Access 2000 and 2002, I have created an import specification to import the fixed-width recordset below into an existing table. I am having strange problems with the import of the date and time fields. 177 102003 16:43:12 102003 18:43:12 6OAG0ADP Y 0000 0000 0000 0000 61930 4HGA800 165 102003 17:43:12 102003 18:44:12 6OAG0ADP Y 0000 0000...
4
3015
by: Steve Jorgensen | last post by:
I'm restarting this thread with a different focus. The project I'm working on now id coming along and will be made to work, and it's too late to start over with a new strategy. Still, I'm not coming to a firm conclusion over whether it was the better approach, and wonder if I should do it differently the next time I'm faced with a similar...
3
5805
by: muttu2244 | last post by:
Hi all Am trying to read an html page using win32com in the following way. from win32com.client import Dispatch ie = Dispatch("InternetExplorer.Application")
3
6922
by: tyler.schlosser | last post by:
Hi there, I am trying to launch a program called AmiBroker using the command: AB = win32com.client.Dispatch("Broker.Application") However, I have a dual-core CPU and would like to launch two instances of AmiBroker. I know it is possible to run two instances simultaneously since it is easy to do manually by double-clicking the...
4
2933
by: learnerofpython | last post by:
I am new to python whenever i import win32com.client i get the following error message: RuntimeWarning: Python C API version mismatch for module win32api: This Python has API version ... how to decide which build (e.g. 201/202/203/...) of win32com.client has to be install
11
7685
by: Bill Davy | last post by:
I am trying to edit Contacts in Outlook. This is so I can transfer numbers from my address book which is an Excel spreadsheet to my mobile phone. I came across the following snippet of code which enabled me to the contacts at least list. I had to root around to discover CdoDefaultFolderContacts (though it was guessable; how could I...
2
10471
by: RyanN | last post by:
Greetings, I'm trying to get DispatchWithEvents() to work with HyperAccess (terminal program) without much success. I've done a bunch of searching and found some examples using IE: This works but doesn't handle the "Event Driven Functions": haObj = win32com.client.Dispatch(r"HAWin32") And so does this Internet Explorer Example:
0
7828
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8186
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. ...
1
7936
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8197
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...
0
6583
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...
1
5704
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...
1
2335
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
1
1436
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1160
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.