Create Excel Files without COM
Thomas Guettler
st-newsgroups at thomas-guettler.de
Thu Apr 11 03:55:11 EDT 2002
James Strater wrote:
> Thomas Guettler <st-newsgroups at thomas-guettler.de> wrote::
>
>
>>Hi!
>>
>>Is there something like WriteExcel from perl in python?
>>I need to generate an MS-Excel file. I don't want to use
>>COM although it will run on windows.
>>
>>The data is simple. Just text in columns and rows.
>>
>
>
> You can format your output as HTML, and then put a .xls extension on it.
> When it is opened in excel, it will be fine. To see what your input needs
> to look like, take your spreadsheet and 'save as' HTML.
Thank you!
At least Excel 2002 and 2000 can open the created HTML.
I pass it to the webbrowser with a content-type like this:
REQUEST.RESPONSE.setHeader('Content-Type',
'application/vnd.ms-excel')
and Excel opens it.
Fine!
thomas
More information about the Python-list
mailing list