txt2xls

Benjamin Niemann b.niemann at betternet.de
Tue Aug 31 14:19:58 CEST 2004


Perhaps this could help you:
http://sourceforge.net/projects/pyxlwriter/

Michele Simionato wrote:

> In would like to convert very simple text files into .xls
> files and I need some help.
> 
> Here is the format of a typical file:
> 
> # begin table.txt
> 
> This should go in the first row,
> first column.
> 
> This should go in the first row,
> second column.
> 
> ====
> 
> This should go in the second row,
> first column.
> 
> This should go in the second row,
> second column.
> 
> ====
> 
> This should go in the third row,
> first column.
> 
> This should go in the third row,
> second column.
> 
> # end table.txt
> 
> "====" separates different rows, whereas different colums are separated
> by an empty line. table.txt should be converted into a table.xls 
> file containing a 3x2 table like this:
> 
>    ================================     ================================
>    This should go in the first row,     This should go in the first row,
>    first column.                        second column.
>    --------------------------------     --------------------------------
>    This should go in the second row,    This should go in the second row,
>    first column.                        second column.
>    --------------------------------     --------------------------------
>    This should go in the third row,     This should go in the third row,
>    first column.                        second column.
>    ================================     ================================
> 
> I use OpenOffice on Linux, but I have no experience at all about the .xls
> format, so I would welcome help/pointers and especially snippets of code ;)
> TIA,
> 
>                   Michele Simionato



More information about the Python-list mailing list