View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
stevieb stevieb is offline
external usenet poster
 
Posts: 16
Default Pipe-Delimited CSv File

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

"Dave Peterson" wrote:

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.

stevieb wrote:

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


--

Dave Peterson