login about faq

I have a CSV file, the fields are delimited with commas and double quotes, but sometimes a field will have a single double quote. How do I get the chilkat CSV function to read this in correctly?

The sample I have is

"Code","Quantity","Description"

"ABC123","4","40" HD TV"

I have tried escaping the single double quote but this has not helped. How can I import this as I want?

asked Jun 18 '12 at 11:33

JJD's gravatar image

JJD
1111


A double-quote that occurs within a double-quoted string should be represented as a pair of double quotes, like this:


"Code","Quantity","Description"
"ABC123","4","40 ""HD TV"

link

answered Jun 19 '12 at 09:09

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

For more information about CSV standards, see http://en.wikipedia.org/wiki/Comma-separated_values

link

answered Jun 19 '12 at 09:11

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×3

Asked: Jun 18 '12 at 11:33

Seen: 1,062 times

Last updated: Jun 19 '12 at 09:11

powered by OSQA