![]() |
Pipe-Delimited CSv File
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 |
Pipe-Delimited CSv File
Edit: My 'List Seperator = " | " not " , ".
That is what i meant by saying commas as pipes. "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 |
Pipe-Delimited CSv File
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 |
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 |
All times are GMT +1. The time now is 02:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com