473,787 Members | 2,932 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 5804
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
3986
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 documentation for the py2exe tool and everything compiles ok, except that when I run the exe, I get an...
4
1670
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
8182
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 0000 0000 61930 4HGA800 177 102003 16:41:18 102003 18:45:12 6OAG0ADP Y 0000 0000 0000 0000 61930...
4
3025
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 issue. I needed an app to automatically import from spreadsheets with a semi-dynamic structure,...
3
5862
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
6958
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 AmiBroker.exe file twice. However, when I write two lines of code like this:
4
2943
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
7741
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 enumerate win32com.client.constants?). I now want to work through the Contacts in Outlook patching in...
2
10529
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
10363
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...
1
10110
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9964
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
8993
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
7517
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
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4067
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
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.