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?
This question is related to
excel
csv
double-quotes
open powershell and run below command:
import-csv C:\Users\Documents\Weekly_Status.csv | export-csv C:\Users\Documents\Weekly_Status2.csv -NoTypeInformation -Encoding UTF8
Here's a way to do it without formulas or macros:
(from http://www.lenashore.com/2012/04/how-to-add-quotes-to-your-cells-in-excel-automatically/)
In Excel for Mac at least, you can do this by saving as "CSV for MS DOS" which adds double quotes for any field which needs them.
Double quotes can be achieved using VBA in one of two ways
First one is often the best
"...text..." & Chr(34) & "...text..."
Or the second one, which is more literal
"...text..." & """" & "...text..."
Source: Stackoverflow.com