Python csv creating extra carriage return
Posted on 2011-03-22
I'm creating a comma delimited file using Python's csv module. I'm writing rows by using the csvwriter.writerow(row)
When I do that and open the resulting file in MS Excel, I'm getting an extra blank line in between each row. Looking at the hex of the file, there are two carriage returns and a line feed CR CR LF at the end of every row.
How can I stop the extra carriage return when using writerow() ?
I'm certain my data does not contain a carriage return. Also, when I run the same application under linux, the extra carriage return is not there and I'm able to open the file in Excel without problem.
I'm using Python 2.6.