excel in unix?

S

s99999999s2003

hi
is it possible to create excel files using python in Unix env?
if so, what module should i use?
thanks
 
R

Robert J. Hansen

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.
 
C

Christian Meesters

hi
is it possible to create excel files using python in Unix env?
if so, what module should i use?
thanks
You might want to give pyExelerator a try:
http://sourceforge.net/projects/pyexcelerator

Remark: I had the problem of having a bunch of Data on my Linux machine and
some students to teach, who didn't know anything of Linux. (And OpenOffice
was not capable of doing what I wanted it to do, btw.) So I choosed
pyExelerator in combination with PreExisting EXCEL-Sheets.

Cheers,
Christian
 
L

linnorm

hi
is it possible to create excel files using python in Unix env?
if so, what module should i use?
thanks

Depending on the complexity of your data you might find the csv module
useful. It allows you to write comma separated value (.csv) files that
Excel reads just fine.
 
H

Harry George

Depending on the complexity of your data you might find the csv module
useful. It allows you to write comma separated value (.csv) files that
Excel reads just fine.

We use the csv module a lot. I've also investigated the old DIF and
SLK formats for slightly more functoinality. But the coming
standards-based world, if you need more than csv, start writing to to
the OpenOffice.org formats, either with your own code or via PyUNO.
Then use OOo itself or a MS-sponsored ODF reader to translate to Excel
format. This should be a maintainable approach over time (but a lot
more complex than just csv).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,097
Latest member
RayE496148

Latest Threads

Top