Csv blank rows problem with Excel

I have a csv file which contains rows from a sqlite3 database. I wrote the rows to the csv file using python.

When I open the csv file with Ms Excel, a blank row appears below every row, but the file on notepad is fine(without any blanks).

Does anyone know why this is happenning and how I can fix it?

Edit: I used the strip() function for all the attributes before writing a row.

Thanks.

Answers


You're using open('file.csv', 'w')--try open('file.csv', 'wb').

The Python csv module requires output files be opened in binary mode.


Need Your Help

how to show a movie after another was finished

jquery hide show duration

I have 3 short movies and I want to display them one after another to look a unit. How can I do this considering the lenght of each one (about 4,5 sec)

Passing QLabel as a parameter in Qt Creator gives error

qt qlabel

I am trying to pass a QLabel as a parameter to another function that is supposed to change the style of the label:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.