Adding double quote delimiters into csv file
This is actually pretty easy in Excel (or any spreadsheet application).
You'll want to use the =CONCATENATE()
function as shown in the formula bar in the following screenshot:
Step 1 involves adding quotes in column B,
Step 2 involves specifying the function and then copying it down column C (by now your spreadsheet should look like the screenshot),
Step 3 (if you need the text outside of the formula) involves copying column C, right-clicking on column D, choosing Paste Special >> Paste Values. Column D should then contain the text that was calculated in column C.
Here's a way to do it without formulas or macros:
- Save your CSV as Excel
- Select any cells that might have commas
- Open to the Format menu and click on Cells
- Pick the Custom format
- Enter this => \"@\"
- Click OK
- Save the file as CSV
(from http://www.lenashore.com/2012/04/how-to-add-quotes-to-your-cells-in-excel-automatically/)
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