Is anyone happy with csv module?

Marco Mariani marco at sferacarta.com
Wed Dec 12 10:43:43 EST 2007


massimo s. wrote:

> As for people advicing xlrd/xlrwt: thanks for the useful tip, I didn't
> know about it and looks cool, but in this case no way I'm throwing
> another dependency to the poor users of my software. Csv module was
> good because was built-in.

The trouble with sending CSV files to Excel (or OpenOffice, or Gnumeric, 
or whatever) is that there is no way to specify the data types.

Unless you're using a predefined worksheet (and refreshing its data from 
the CSV file) the spreadsheet program _won't_ get the data types right. 
Strings will become numbers (and stripped of precious leading zeroes), 
dates may (or may not) become floats or something entirely different. 
Fixed point decimals might grow eyes and bite you.





More information about the Python-list mailing list