Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am creating CSV files to be opened in Excel. The rows are separated by CRLF and that's fine, but some of the input data contains CRLF data in it as well. Per the usual standards, I surround them with quotes, but Excel doesn't seem to recognize the CR character and puts a little box with a question mark in it instead. I can strip the CR's out of the CSV file, but it seems like an unnecessary step. Is there an easy way to get Excel to recognize a CRLF inside a row of a CSV file?

share|improve this question
What version of Excel do you use? – mguassa Jul 23 '15 at 20:19

This works for me:

first record,"line one
line two",1
second record,only one line,2

In other words, the first record takes up more than one line in the CSV.

share|improve this answer
For me, Excel correctly recognizes "line one line two" as a single cell, but places an unrecognized character marker just before the line feed. – Ben Fulton Sep 16 '10 at 19:58
This also works perfectly fine for me. No unrecognized character. Tested using Excel 2003. – wilson Sep 17 '10 at 1:30

It looks like just using vbLf is the answer. You are going to need to strip the carriage returns.

Take a look over at this StackOverflow question.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .