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

interfacing to a remote excel app

P: n/a
pyHello,
Google helped me find a nice package to interface python with MS Excel.
"win32all", or sometimes called by the name "pywin32".

http://starship.python.net/crew/mhammond/

However, this win32all extension seems to be specifically built for the
windows platform only.

What could I use if I want to interface to excel from a python interpreter
running on a remote UNIX machine?

The specific task I want to accomplish is as follows:
I want python on UNIX to be able to make selections in excel (highlight rows).
Also, I want to have changes in the selected (highlighted) items in excel
to be communicated to the python running on UNIX.

What would be the best way to do this?

Thanks,

Bram

PS: A possible approach would be to run two interpreters, one on both
platforms, and have the MS python talk to excel. However, I would like a
solution with low-impact to the MS platform, and want to get away without
having to install python and win32all on the MS machine.

--
------------------------------------------------------------------------------
Bram Stolk, VR Engineer.
SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP AMSTERDAM
email: br**@nospam.sara.nl Phone +31-20-5923059 Fax +31-20-6683167

"For the costs of subsidized agriculture in the EU, we can have all 56 million
European cows fly around the world. First Class." - J. Norberg
------------------------------------------------------------------------------
Jul 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Let me start by saying, that I don't have a 'solution-to-go' on this, but
I'll give it a go anyway.

An idea would be to investigate on DCOM (Distributed COM) and accessing that
from Unix. I have no clue on how to do this, so I leave that as an exercise
for yourself.

Otherwise...

If you have no problem having 2 seperate interpeters, It's fairly easy to
come up with a small xml-rpc interface and acces it through that.

just my 2 cents,

ps. de groeten aan Gijs en Bas :)

"Bram Stolk" <br**@nospam.sara.nl> wrote in message
news:20*********************@pistache.sara.nl...
pyHello,
Google helped me find a nice package to interface python with MS Excel.
"win32all", or sometimes called by the name "pywin32".

http://starship.python.net/crew/mhammond/

However, this win32all extension seems to be specifically built for the
windows platform only.

What could I use if I want to interface to excel from a python interpreter
running on a remote UNIX machine?

The specific task I want to accomplish is as follows:
I want python on UNIX to be able to make selections in excel (highlight rows). Also, I want to have changes in the selected (highlighted) items in excel
to be communicated to the python running on UNIX.

What would be the best way to do this?

Thanks,

Bram

PS: A possible approach would be to run two interpreters, one on both
platforms, and have the MS python talk to excel. However, I would like a
solution with low-impact to the MS platform, and want to get away without
having to install python and win32all on the MS machine.

--
-------------------------------------------------------------------------- ---- Bram Stolk, VR Engineer.
SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP AMSTERDAM email: br**@nospam.sara.nl Phone +31-20-5923059 Fax +31-20-6683167

"For the costs of subsidized agriculture in the EU, we can have all 56 million European cows fly around the world. First Class." - J. Norberg
--------------------------------------------------------------------------

----
Jul 18 '05 #2

P: n/a
Bram Stolk <br**@nospam.sara.nl> writes:
pyHello,
Google helped me find a nice package to interface python with MS Excel.
"win32all", or sometimes called by the name "pywin32".

http://starship.python.net/crew/mhammond/

However, this win32all extension seems to be specifically built for the
windows platform only.

What could I use if I want to interface to excel from a python interpreter
running on a remote UNIX machine?

The specific task I want to accomplish is as follows:
I want python on UNIX to be able to make selections in excel (highlight rows).
Also, I want to have changes in the selected (highlighted) items in excel
to be communicated to the python running on UNIX.

What would be the best way to do this?

Thanks,

Bram

PS: A possible approach would be to run two interpreters, one on both
platforms, and have the MS python talk to excel. However, I would like a
solution with low-impact to the MS platform, and want to get away without
having to install python and win32all on the MS machine.

--
------------------------------------------------------------------------------
Bram Stolk, VR Engineer.
SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP AMSTERDAM
email: br**@nospam.sara.nl Phone +31-20-5923059 Fax +31-20-6683167

"For the costs of subsidized agriculture in the EU, we can have all
56 million European cows fly around the world. First Class." -
J. Norberg
------------------------------------------------------------------------------


You are going to have to do *something* on the MS Excel box.
Otherwise you have a security nightmare (I'm now accessing your Excel
spreadsheet, and I don't even have to tell you about it.)

So it is a matter of how much work you are willing to do on the MS
box. Installing a py2exe bundle is pretty straightforward, so I'm not
sure this is a stumbling block. You could do a proxy with
Python-and-pywin32 talking to Excel via COM, and to the LAN via Pyro
or XMLRPC or SOAP.

Other than that, you could try to setup remote access to Excel.NET via
..NET remoting, and try to reach that from Mono or DotGNU. But .NET
and its clones are not very Python-friendly, so the bindings may not
be available. Even if you got it to work, you would be in a Microsoft
lockin situation, subject to changing protocols as .NET evolved (and
as patent fights perhaps made non-MS implementaitons difficult.)

--
ha************@boeing.com
6-6M21 BCA CompArch Design Engineering
Phone: (425) 342-0007
Jul 18 '05 #3

P: n/a
In article <xq*************@cola2.ca.boeing.com>,
Harry George <ha************@boeing.com> wrote:
Jul 18 '05 #4

P: n/a
Bonjour !

Pour un problème similaire, j'ai fais :

- sur la machine Windows/Excel : un script Python, petit serveur TCP, qui
pilote Excel par COM
- sur la machine distante un autre script Python envoie ses instructions
"Excel", via TCP, et reçoit la réponse en retour.

Résultat : ça marche bien, même à travers Internet.
In english (try) :

Hi !

For a similar problem, I have make:
- on the Windows/Excel machine: a script Python, little server TCP, which
controls Excel by COM
- on the distant machine another Python script sends its instructions
"Excel", via TCP, and receive the response in return.

Result: it goes well, even through Internet.


@-salutations
--
Michel Claveau
mél : http://cerbermail.com/?6J1TthIa8B
site : http://mclaveau.com


Jul 18 '05 #5

P: n/a
One solution that I have used is a COM/CORBA bridge. A fairly decent
one is here:

http://www.octatec.co.uk/CB_sum.htm

But it still requires installation on the windows box. Your goal is
pretty easy actually if you can install python on the windows box.

Now for a completely off the wall suggestion. Have you tried win32all
and DCOM running under wine (linux win32 api)? That might supply enough
of the framework for you to get things running. I'd be very interested
if you can get this to work :)

Brian Kelley
Jul 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.