Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

One of our Web Applications gives the users the ability to add multiple items to our database using a CSV file. To do this, they enter their items into an Excel template and then export to CSV.

However, most end users don't understand that if they put commas into the "Description" field it messes with the formatting of the exported CSV file, causing errors when trying to add items to the database.

I would normally just parse through the CSV in the back-end of the web app, but in my case I cannot just simply take out commas for obvious reasons.

Is there any way to disable the use of commas (,) right in the Excel Template? Like formatting a column?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Excel fields with a comma in them are exported with quotes surrounding them.

Your CSV import should handle these quotes to allow for the importing of fields with commas in them.

Most languages have a CSV importing module which does it for you.

share|improve this answer
    
Ah, very true. I must have overlooked this considering I already parse out the Quotes in the case that the item being entered is a "Drill Cordless 1/2" 4.4A". I'll have to modify my CSV Reader to also parse out the commas where quotes are present. Thanks! –  Lando Apr 5 '11 at 16:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.