spreadsheet format

Steve Holden sholden at holdenweb.com
Mon Mar 17 08:48:29 EST 2003


<user at domain.invalid> wrote ...
> This not really a python question, but here it goes:
>
> I have data with the format
>
> Name\Header Header1 Header2 Header3... HeaderN
> name1 4 5 6 6
> name2 5 6 4 3
>          .
> .
> .
> nameN 6 56 6 1
>
> My problem is if I email the data as plain text the formatting
> is usually lost, especially when printing. So, I looked at
> Comma Separated Values (CSV) and Data Interchange Format (DIF).
> Finding The CSV format specifaction has been a mission, but
> from what I gatherd the spec was to general. For instance,
> the is no predifined value seperator, and there is no distinction
> between text and number values. I am currently looking, at DIF,
> but the doc I have is a bit cryption (at least for me). Besides
> that, for interest sake, I creaded a DIF file with "gnumeric",
> and that didn't open woth "open office" - to more accurate, the
> data was empty.
>
> In short, what would be the recommend data format for my needs?
> I would prefare a format the is not platform or software
> specific.
>
>
> Any ideas?
>
The obvious solution would be XML, at which Python excels (no pun intended
:-). Is there some reason why you haven't mentioned it (other than
completely overlooking it)? Because it's a text-based format you can usually
rely on it arriving at its destination unmangled.

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/
Register for PyCon now!            http://www.python.org/pycon/reg.html







More information about the Python-list mailing list