By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

Live conversation between Python and an Excel spreadsheet

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.