Adding double quote delimiters into csv file

user338034 picture user338034 · Aug 11, 2014 · Viewed 123.4k times · Source

I have a number of text files which contain radio programme titles where each item is on a separate line, e.g.:

15 by 15
15 Minute Drama
Adrian Mole
Afternoon Drama
Afternoon Reading
etc

I would like to add double quotes as delimiters to each line, e.g.:

"15 by 15"
"15 Minute Drama"
"Adrian Mole"
"Afternoon Drama"
"Afternoon Reading"
etc

I thought I might be able to do this in Excel but not been able to find a way. I really don't mind whether the solution is Excel based or something else, as long as I don't have to do it manually.

Can anyone help please?

Answer

Anthony Wang picture Anthony Wang · Aug 2, 2016

Here's a way to do it without formulas or macros:

  1. Save your CSV as Excel
  2. Select any cells that might have commas
  3. Open to the Format menu and click on Cells
  4. Pick the Custom format
  5. Enter this => \"@\"
  6. Click OK
  7. Save the file as CSV

(from http://www.lenashore.com/2012/04/how-to-add-quotes-to-your-cells-in-excel-automatically/)