Pipe-Delimited CSv File

  • Thread starter Thread starter stevieb
  • Start date Start date
S

stevieb

Hello,

My system settings are set to have commas shown as pipes.

But when I use the following command in VB, the output file still uses
commas -

WS.SaveAs "c:\filename.csv", xlCSV

I presume there is a listing of valid "FileFormats". If there is a link,
that would also be appreciated.

Thank you
 
Edit: My 'List Seperator = " | " not " , ".

That is what i meant by saying commas as pipes.
 
You could create a macro that exports the data the way you want.

Here are three sites that you could steal some code from:

Earl Kiosterud's Text Write program:
www.smokeylake.com/excel
(or directly: http://www.smokeylake.com/excel/text_write_program.htm)

Chip Pearson's:
http://www.cpearson.com/excel/imptext.htm

J.E. McGimpsey's:
http://www.mcgimpsey.com/excel/textfiles.html

(or maybe you could build your own formula and copy|paste into Notepad.)

Check out Earl's Text Write program first. It may do exactly what you want
right out of the box.
 
I don't think I was clear...

WS.SaveAs "c:\filename.csv", xlCSV

That line of VB code creates a CSV file but with commas ( , ) not with pipes
( | ).

- xlCSV is the Fileformat, which is incorrect for what I would like to do.
Is there not another fileformat which include pipes, instead of commas.

Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top