Re: Problem reading csv files

2008-01-04 Thread Ramashish Baranwal
> > XLS != CSV > XLS is M$'s format for spreadsheets whereas CSV is essentially a text > document with comma-delimited fields. If you open it up in OpenOffice > and go File -> Save As then in the 'Save as type:' drop-down list > select 'Text CSV (.csv)' and ofc change your code to point to the new

Re: Problem reading csv files

2008-01-03 Thread Chris
On Jan 4, 6:24 am, Ramashish Baranwal <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to read a csv file using csv.reader. The file is created > using Open Office and saved in Excel format. > > import csv > > reader = csv.reader(open('test.xls')) > for row in reader: > print row > > It however

Re: Problem reading csv files

2008-01-03 Thread gsal
Well, I don't know much python, yet, but I know a csv file when I see one...and an Excel files in not a csv file. As far as I know, an Excel file is stored probably in binary and in a propriatery format...I doubt very much csv.reader would read that just like that; then again, I know nothing about

Problem reading csv files

2008-01-03 Thread Ramashish Baranwal
Hi, I am trying to read a csv file using csv.reader. The file is created using Open Office and saved in Excel format. import csv reader = csv.reader(open('test.xls')) for row in reader: print row It however throws the exception _csv.Error: : line contains NULL byte Any idea whats going wro