473,407 Members | 2,315 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,407 software developers and data experts.

Live conversation between Python and an Excel spreadsheet

Hi,
I have an application that requires that Python initiate and mediate a live
and iterative conversation
between an external application (in which Python is embedded) and an
external Excel
spreadsheet. Python will have to pass info to the spreadsheet, spreadsheet
will make
calculations, Python will obtain results and pass back to
application, application will evaluate
results of spreadsheet calculations and create new set of data and
instructions, Python will pass
new data and instructions to spreadsheet, loop goes on 'n' times until
convergence to solution
or no solution. Python terminates conversation and returns control to
application until next
'conversation'.

If I had my choice (which I don't) I would re-code the spreadsheet in
Python, but that is not an
option in this case.

Is there anyone on the list that has done this before and has an elegant
solution? If so, what Python modules should I look at? Are there any good
Python books out there that have
examples of this?

I am experienced with Python and have some knowledge of COM objects etc....

Any help would be very much appreciated.

Thanks
Jul 18 '05 #1
2 2086
qu*****@primenet.com wrote:
Hi,
I have an application that requires that Python initiate and mediate a
live and iterative conversation
between an external application (in which Python is embedded) and an
external Excel
spreadsheet. Python will have to pass info to the spreadsheet,
spreadsheet will make
calculations, Python will obtain results and pass back to application,
application will evaluate
results of spreadsheet calculations and create new set of data and
instructions, Python will pass
new data and instructions to spreadsheet, loop goes on 'n' times until
convergence to solution
or no solution. Python terminates conversation and returns control to
application until next
'conversation'.

If I had my choice (which I don't) I would re-code the spreadsheet in
Python, but that is not an
option in this case.

Is there anyone on the list that has done this before and has an elegant
solution? If so, what Python modules should I look at? Are there any
good Python books out there that have
examples of this?

I am experienced with Python and have some knowledge of COM objects etc....

Any help would be very much appreciated.

Thanks

Your best bet would be to interact with Excel as a COM object, as
described in the excellent "Python Programming on Win32" by Robinson and
Hammond. However, be aware that you'll probably end up ferreting around
to find out about undocumented methods of Excel objects, as the docs are
often far from complete.

regards
Steve
Jul 18 '05 #2
qu*****@primenet.com wrote:
Hi,
I have an application that requires that Python initiate and mediate a
live and iterative conversation
between an external application (in which Python is embedded) and an
external Excel
spreadsheet. Python will have to pass info to the spreadsheet,
spreadsheet will make
calculations, Python will obtain results and pass back to application,
application will evaluate
results of spreadsheet calculations and create new set of data and
instructions, Python will pass
new data and instructions to spreadsheet, loop goes on 'n' times until
convergence to solution
or no solution. Python terminates conversation and returns control to
application until next
'conversation'.

If I had my choice (which I don't) I would re-code the spreadsheet in
Python, but that is not an
option in this case.

Is there anyone on the list that has done this before and has an elegant
solution? If so, what Python modules should I look at? Are there any
good Python books out there that have
examples of this?

I am experienced with Python and have some knowledge of COM objects etc....

Any help would be very much appreciated.

Thanks

Your best bet would be to interact with Excel as a COM object, as
described in the excellent "Python Programming on Win32" by Robinson and
Hammond. However, be aware that you'll probably end up ferreting around
to find out about undocumented methods of Excel objects, as the docs are
often far from complete.

regards
Steve
Jul 18 '05 #3

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

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
3
by: ian castleden | last post by:
From time to time I see requests for some sort of python MS Excel interface/software. I have written just such software 100% python (works with Jython too! at least it did a year ago). It was...
6
by: Wolfgang Keller | last post by:
Hello, I'm looking for a spreadsheet application (MacOS X prefered, but Windows, Linux ar available as well) with support for Python scripting (third-party "plug-ins" are ok) and a database...
0
by: MARK TURNER | last post by:
Hi, Can anyone point me in the right direction to learn how to get real time updates in an Access form from an Excel spreadsheet? I'm trying to link the following formula which exists in an...
0
by: Rich Wallace | last post by:
Hello all, Looking for suggestions and tips if possible. I have an application running on a file server that utilizes the FileSystemWatcher to trap when any Excel files are saved by a user. I...
1
by: garry.oxnard | last post by:
Can anyone help me to solve a problem which involves switching from Access to Excel (then back to Access) programatically please? I have an Excel template which, on open, also opens an Access...
0
by: Grip | last post by:
Hi, I have gone throught the group and Microsoft's online help and have seen many suggestions but I am still seeking clarity: 1. I have an excel spreadsheet. Column A contains text that may...
1
by: Sport Girl | last post by:
Hi everybody , i have the task of developing in Perl a script that retrieves data from 3 tables ( bugs, profiles, products) from a MySQL database called bugs and display them in an excel sheet...
0
by: nphankey | last post by:
I'm struggling to tame Excel using Python and COM. Most of the following code is working except for the setting of the activesheet. Also, I would like to know how to release a COM object...
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
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...
0
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
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
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...

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.