Creating Excel files on Linux

Hamish Lawson hamish_lawson at yahoo.co.uk
Fri Sep 7 06:43:08 EDT 2001


Joonas Paalasmaa:

> Is there any way to create xls or some other format that
> MS Excel can read excluding CSV.
> I am using Linux so I think that COM is not an option.

Does your reference to COM imply that you have Excel running on a
Windows machine, but that you don't currently have a way to
communicate with it from a Linux machine? If so, then there is a free
download of DCOM for Linux  [LinuxDCOM] available from Software AG.
You may then perhaps be able to adapt the PythonCOM library in the
win32all package [win32all] for use on Linux.

Alternatively, set up some kind of gateway server on your Windows
machine that provides a remote service for manipulating Excel
spreadsheets. This service would use the win32all [win32all] PythonCOM
library to talk to Excel locally. The remote service could be
implemented as a Pyro [Pyro], SOAP [SOAP1][SOAP2] or XML-RPC[XMLRPC]
server on your Windows machine; your program on your Linux machine
would then use the appropriate client libraries to communicate with
your remote service on the Windows machine.

As another alternative, the Spreadsheet::WriteExcel module
[WriteExcel] for Perl is a cross-platform module that can create Excel
spreadsheets without needing a copy of Excel. You could consider
converting it to Python, or else call it directly from within Python
using ActiveState's PyPerl module [PyPerl] that embeds a Perl
interpreter in Python.

[LinuxDCOM] http://www.softwareag.com/entirex/download/free%5Fdownload.htm
[win32all] http://aspn.activestate.com/ASPN/Downloads/ActivePython/Extensions/Win32all
[Pyro] http://www.xs4all.nl/~irmen/pyro.html
[SOAP1] http://www.pythonware.com/products/soap/
[SOAP2] http://sourceforge.net/projects/pywebsvcs/
[XMLRPC] http://www.pythonware.com/products/xmlrpc/
[WriteExcel] http://search.cpan.org/search?dist=Spreadsheet-WriteExcel
[PyPerl] http://ftp.activestate.com/Zope-Perl/


Hamish Lawson



More information about the Python-list mailing list