Google Sheets – CSV Download Comes Out on One Line

google sheets

I have created a very simple spreadsheet of 3 columns with about 5 rows of data (as a test). When I download it as a CSV it comes out all in one line; I would expect each row to be a separate line. How can I achieve this?

If I populate the first 3 columns and first 4 rows I would expect this (and get it from Excel) when opened in a text editor (e.g. Notepad):

a,b,c
hi,how,are
you,doing,today
i,like,kittens

Instead, I get this:

a,b,chi,how,areyou,doing,todayi,like,kittens

Best Answer

I just did a test myself, and can see what you're seeing.

The problem isn't with Google or the download. The problem is that Windows (and thus Notepad) expects to see both a carriage return character (ASCII 13) and a linefeed character (ASCII 10) to indicate the end of the line. The CSV generated by Google Docs only uses the linefeed character so, to Notepad, there's no indication where the line ends.

Excel is different and can recognize the linefeed as the end of the line, which is why it opens there just fine. Note, though, that if you use Excel for Windows to create a CSV file, it will use a carriage return and linefeed at the end of each line.

In order to see the CSV file in the way you expect, you need to use a text editor/viewer that's smarter about linefeeds without carriage returns. Notepad++ is the one I use, but there are a plethora of Notepad replacements out there.