5

Hi i am trying to put end of line code in CSV format to import it to excel I tried putting
\n, "\n", \r, "\r", \r\n, "\r\n" but nothing worked for me I am trying to import it in excel 2013 my csv format is like below

Medicine;1213;22;19\nMedicine (miscellaneous);1013;32;55\nEngineering;708;14;21

please help. Field delimiter working fine but how to manage line break I want out put like this

Medicine                   | 1213 | 22 | 19   
Medicine (miscellaneous)   | 1013 | 32 | 55   
Engineering                | 708  | 14 |21

Thank you for your any help and suggestions

sanu
  • 1,048
  • 3
  • 14
  • 28

4 Answers4

6

In Notepad++ you can just do the following find and replace:

Find:

\\n

Replace:

\n

Be certain to do this in regex mode, not regular mode.

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360
1

CSV uses RFC 4180. So the comment https://stackoverflow.com/a/42666642/9179591 is incorrect. Most use cases are going that the EOL of csv is CR/LF.

In Unix(Ubuntu in my case), you can look it, when you open your file in cat -A /<someYourFilePath>

Community
  • 1
  • 1
0

if the above is your text file. I have found that just pressing enter works in the text file.

example:

Medicine;1213;22;19
Medicine (miscellaneous);1013;32;55
Engineering;708;14;21

This is what worked for me.

Janwilx72
  • 502
  • 4
  • 18
0

The \n is just text to Excel. I used Word to Replace \n with Special Character Paragraph Code then saved as a txt file and that imported into Excel.

June7
  • 19,874
  • 8
  • 24
  • 34