Excel – Importing multiline cells from csv file into excel

csvmicrosoft-excel-2007

I have a csv file (comma delimited and quoted).
When csv file is opened directly from explorer excel correctly interprets the cells that are mutliline, but it messes up the character encoding (utf-8).

Therefore I have to use import function (Data/Get External Data/From Text). However, when I use import text function in excel (where I can set file encoding explicitly) it interprets the newline as start of the new row instead of putting multiline text into a single cell and breaks the file layout.

Can I somehow overcome the situation by either

  • forcing the explorer open command to use 65001: Unicode (UTF-8) encoding
  • forcing the Text Import Wizard to ignore quoted line breaks as record delimiters

Best Answer

Use LibreOffice to open the file, then save in desired format: I had exactly the same problem you described when trying to use Excel 2010 to read UTF-8 MySQL data with multi-line Japanese text in some fields exported as quoted CSV with \r\n used for end-of-record (tried \r and \n also with no difference in Excel's behaviour). LibreOffice 4.1.3 imported the CSV file correctly, and I could save it in Excel 2010 xlsx format and thereafter open the xlsx file correctly in Excel.

Related Question