473,386 Members | 1,962 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

documentation for win32com?

Is there anything better to read on how to use this module for working
with Office programs? This is not very heartening to read in the
official docs:
-----------------------
How do I know which objects are available?

Good question. This is hard! You need to use the documentation with the
products, or possibly a COM browser. Note however that COM browsers
typically rely on these objects registering themselves in certain ways,
and many objects to not do this. You are just expected to know.
-----------------------

Yeah, thanks...

So does this mean that the code can be different each time, or is there
still a pre-determined way to refer to things, such as opening Excel,
reading a spreadsheet and working with it, etc.? If so, where can I find
a list of those objects and methods?

Thanks.
May 23 '06 #1
4 4639
John Salerno wrote:
So does this mean that the code can be different each time, or is there
still a pre-determined way to refer to things, such as opening Excel,
reading a spreadsheet and working with it, etc.?
For a given version of Excel, there's a "pre-determinied way" of doing
those things. Different versions of Excel may do things the same way or
differently depending on what exactly you're trying to do.
If so, where can I find a list of those objects and methods?


In the documentation for the version of Excel you're using.

Ross Ridge

May 23 '06 #2
The Excel docs are your best bet. The examples they give
are all MS-specific languages like VB, but most translate
fairly easily to Python.

You can also run makepy on the Excel typelib, which will
generate a file with all the methods, events etc available
thru the Excel object model.

Also, searching this group and the pywin32 mailing list
for "excel.application" turns up a bunch of sample code.

hth
Roger
"John Salerno" <jo******@NOSPAMgmail.com> wrote in message news:hQ******************@news.tufts.edu...
Is there anything better to read on how to use this module for working with Office programs? This is not very heartening to
read in the official docs:
-----------------------
How do I know which objects are available?

Good question. This is hard! You need to use the documentation with the products, or possibly a COM browser. Note however that
COM browsers typically rely on these objects registering themselves in certain ways, and many objects to not do this. You are
just expected to know.
-----------------------

Yeah, thanks...

So does this mean that the code can be different each time, or is there still a pre-determined way to refer to things, such as
opening Excel, reading a spreadsheet and working with it, etc.? If so, where can I find a list of those objects and methods?

Thanks.



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
May 24 '06 #3
Hi!
MS-Office-2007 beta2, can downloaded here :
http://www.microsoft.com/office/prev...etthebeta.mspx
(with a passport account).

Doc, for COM access, are include in the help-system.
@-salutations

MCI
May 24 '06 #4

Roger Upole wrote:
The Excel docs are your best bet. The examples they give
are all MS-specific languages like VB, but most translate
fairly easily to Python.

You can also run makepy on the Excel typelib, which will
generate a file with all the methods, events etc available
thru the Excel object model.

You should definately run makepy, it will be a great help, but there
are objects for which you can still not get any 'help' from your IDE's
autocompletion...
In those cases you'll just have to wing it, and indeed refer to the
Excel helpfiles for VBA methods/objects/etc.

Look at some samples on the web, and experiment a lot (using the
PythonWin IDE seems to work quite well for this kind of experimenting,
perhaps IDLE would also do it quite well. Due to the dynamic nature of
this kind of explorations, the pydev Eclipse plugin doesn't work well
for it).

Also, searching this group and the pywin32 mailing list
for "excel.application" turns up a bunch of sample code.

hth
Roger


Cheers,

--Tim

May 24 '06 #5

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

Similar topics

1
by: Justin Stockton | last post by:
I recently upgraded from ActivePython 2.2.2 to ActivePython 2.3.2 and I'm running into an issue importing the win32com.client module. Before installing the new version, I made sure to properly...
3
by: RJ | last post by:
Hi, I've been going over the Quick Start to Client side COM and Python and many other sources, but cannot find an example that will get my com/ActiveX .ocx USB device driver imported. The Excel...
0
by: Paul McGuire | last post by:
Software versions: Python - 2.3.3 win32all extensions - build 163 OS- Win2000 SP4 I am having trouble in accessing a customer's proprietary COM type library. After running makepy against the...
2
by: Sibylle Koczian | last post by:
Hello, I've installed Python 2.4 and the win32 extensions, using administrator rights, under Windows XP in "C:\Programme". As this is a directory without spaces I didn't expect any problems. But...
3
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...
12
by: vithi | last post by:
Hi Any one tell me where I can get (or download) python modules win32com or win32com.client because I have to use "Dispatch" thanks
2
by: Ray | last post by:
Hi, I need to use cell's background color. when I record a macro from excel, it shows: Rows("7:7").Select With Selection.Interior .ColorIndex = 8 .Pattern = xlSolid
11
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...
1
by: korean_dave | last post by:
Hi. Where can i find the API for this extension? Sourceforge only has downloads. Python has stopped supporting the upkeep of the versions. Thanks.
4
by: sterling | last post by:
I'm curious as to why the difference between IDLE and pythonWin when using win32com. opening an excel file, i've attempted to grab the chart information out of the file. commands like co =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...

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.