Sublime Forum

Importing a CSV file with line breaks in a cell is causing line breaks in sublime text


So I’m having an issue with a CSV file.

I export a CSV from screaming frog. It looks fine when it’s in excel format, but when I import the CSV into sublime text there are line breaks.

I found that the specific field actually has a line break before the strings. There is a HTML line break that was scraped by screaming frog, and thus when I import the CSV into Sublime Text it is creating a line break.

Regardless, sublime text (and google data studio) are taking those line breaks and creating new records/lines.

Any idea how I can fix this? I reached out to screaming frog to see if it was an export issue, they said that wasn’t the case. Mainly because when we checked the excel export, the rows were populating correctly. The only issue was that specific field with the line break was wrapped and not visible unless you clicked into the excel cell.

Here is an stackoverflow showing the line break occurring.


This is the meta description screaming frog is scraping. You can see the line break does exist in the HTML

When I open this as an excel file, it groups the text into the same cell.
When I import this as a CSV file it breaks this into a new record.






Sublime Text is a plain-text editor. There’s a newline character there so it adds a new line. From the looks of things there isn’t a way to escape newline characters in CSV, so there’s really nothing to fix here.