Computing.Net > Forums > Programming > Inserting Header Rom in Data File

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Inserting Header Rom in Data File

Reply to Message Icon

Name: Saif Nawaz
Date: May 14, 2009 at 14:39:19 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

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

abc|ecd|dfj|

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!!!



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: May 14, 2009 at 16:13:47 Pacific
Reply:

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.

Stuart


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Inserting Header Rom in Data File

Nested loop in batch file help www.computing.net/answers/programming/nested-loop-in-batch-file-help/19396.html

Date Routines in Batch Files www.computing.net/answers/programming/date-routines-in-batch-files/15590.html

data files..please help..at least t www.computing.net/answers/programming/data-filesplease-helpat-least-t/8107.html