467,908 Members | 1,846 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,908 developers. It's quick & easy.

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
  • viewed: 1796
Share:
2 Replies
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Allison Bailey | last post: by
3 posts views Thread by ian castleden | last post: by
6 posts views Thread by Wolfgang Keller | last post: by
reply views Thread by MARK TURNER | last post: by
reply views Thread by nphankey | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.