Discussion Locked

Excel CSV quotes problem

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
When saving a .XLS file into a CSV file, how can I consistently get the output all in double quotes abd comma delimited. The latter is a given but the double quotes are a problem with special character handling. We need to feed this particular CSV format into another appl that is very strict about CSV inout to it. It has to have each field in double quotes or it fails processing.

4 replies

by mtnsqs

Have you considered writing a macro that you run first which puts the quotes at start and end of every field? Then do the export.

Other alternative, whcih only works if there are no actauly commas in your data fields is to run an editor on the output csv file to replace every comma by "," and to add a quote at start and end of every line. How hard that is to do depends on your editors - its quite easy in unix with something like awk.
Technically your other progrma is incorrect - CSV does not have to have the quotes .

by mtnsqs

One other possibile way - take the excel data into Access - I am pretty sure that Access will let you specify the the output formatting better.

by michael_dcruz

Nothing new I didn't know. Ideas mentioned were considered but not attainabvle within the timeframe needed for lack of skills.

This discussion is closed to new replies.