excel in unix?

Robert J. Hansen cipherpunk at gmail.com
Thu Aug 10 04:15:59 EDT 2006


> is it possible to create excel files using python in Unix env?

Yes.  An Excel file is just a sequence of bytes, and Python can write
sequences of bytes just fine.  So can many other languages, but why
would you want to use anything but Python?

That's a useless answer to your question, I know.  Perhaps in the
future you may wish to consider asking a more focused question: it
helps people understand precisely what you want to know, and helps
people avoid giving you true-but-useless answers.  :)

> if so, what module should i use?

Python does not have built-in support for Excel-formatted data.
Microsoft Excel is a closed source program with a proprietary data
format, as evidenced by the extreme difficulty competing spreadsheet
software has in correctly implementing the format.  More than that,
attempting to do so would very possibly open Python up to some
unpleasant corners of IP law.

I'd suggest using the formats of Gnumeric or OpenOffice, since those
are open and fully documented.  When you're done, just load them up in
Gnumeric or OpenOffice and use those apps to export them to Microsoft
Excel.  OpenOffice is scriptable--I don't know about Gnumeric--so this
will probably not be unduly painful.

That said, I certainly haven't tried it.




More information about the Python-list mailing list