Inserting Header Rom in Data File

May 14, 2009 at 14:39:19
Specs: Windows XP
Hi, This is what i am trying to do. I hava a Data file "abc.csv" and i am trying to insert header row in it.

I was trying create a new file header.csv with header in it using batch script and then copy data from abc.csv file.
But I am not able to create header.csv file becoz of my column names which are sepereated by pipe(|) delimiter, if i use quotes" i am able to do it but i shld nt be using quotes.

Eg: My header looks like this


and i am using following script

Echo abc|ecd|dfj > C:\header.csv and i am not getting anything in the header.csv file. But when i take out pipes(|) I do get Headers in the file. But i want Column names with | delimiter. Please Help!!!

See More: Inserting Header Rom in Data File

Report •

May 14, 2009 at 16:13:47
You cannot have two different types of delimiters in the same .csv files. It has to be either all commas or all pies, not both.

A header row is no different than any other row in a .csv file. The difference is the way the first row is handled by the application that reads the file. Most applications that read csv files need to be told that the first row is a header row other wise it is just treated like any other row.


Report •
Related Solutions

Ask Question