View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Alan Alan is offline
external usenet poster
 
Posts: 152
Default Adding Header to CSV

mr_bill,

I would look into the "program that produces a CSV file" first to see if
there are any header options.

If not, since the program opens an instance of Excel, you could not
automatically format it unless you have Excel to perform this on start up,
which would affect every file you open.

You could write a macro, and make it available on an Excel toolbar, that you
could click on when the file opens. This macro could set the headers for you.
The only drawback to this is if you have an instance of Excel open at the
time the CSV instance opens, it will error on trying to open the Personal.xls
file for a second time.

Just some thoughts,

Alan


"The only dumb question is a question left unasked."



"mr_bill" wrote:

I have a program that produces a CSV file without headers. When the program
finishes creating the file, it launches excel and opens the CSV. Is there a
way that I can have headers added to the file?