Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Export Excel worksheet as CSV with pipe "|" character as delimiter

Avatar of Dale Fye
Dale FyeFlag for United States of America asked on
Microsoft OfficeMicrosoft AccessMicrosoft Excel
20 Comments1 Solution1613 ViewsLast Modified:
I cannot find the previous question I asked about this.  Someone provided a process by which I could change the delimeter for Excel "CSV" files from a comma to the pipe character.  I need this because some of the text fields contain embedded commas and I don't want to change those, but I need the data in a CSV format for uploading using the SQL Server Bulk Insert command.

At any rate, when I open the Excel spreadsheet manually and save the file as a CSV, (also manually), I get the pipe delimiter.  But if I open the spreadsheet via Access automation and save the worksheet:

    osht.SaveAs Replace(oWbk.FullName, ".xlsx", ".csv"), xlCSV

I get a comma separated file instead of pipe separated.  Can anyone provide any recommendations which will allow me to automate saving the selected sheet of the XL file as a pipe delimited file?

Avatar of John Tsioumpris
John TsioumprisFlag of Greece imageIT Supervisor
This problem has been solved!
Unlock 1 Answer and 20 Comments.
See Answers