Jump to content
We've recently updated our Privacy Statement, available here ×

CSV format


ehssame

Recommended Posts

I am trying to print some static text in double quotes in a CSV export format report .

When I try to put the text as "XYZ" it comes out as """XYZ""" but when I put it as XYZ it comes out correctly as XYZ.

The delimiter I am using is ,

 

Any thoughts what I might be doing wrong ?

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

See the below links about CSV "standard" (there seems to be no formal specification for CSV yet).

 

http://en.wikipedia.org/wiki/Comma-separated_values

http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm

http://tools.ietf.org/html/rfc4180

 

Briefly, the csv exporter will implement the following rules (http://www.edoceo.com/utilis/csv-file-format.php):

 

 

* Each record is one line - Line separator may be LF (0x0A) or CRLF (0x0D0A), a line seperator may also be embedded in the data (making a record more than one line but still acceptable).

* Fields are separated with commas. - Duh.

* Leading and trailing whitespace is ignored - Unless the field is delimited with double-quotes in that case the whitespace is preserved.

* Embedded commas - Field must be delimited with double-quotes.

* Embedded double-quotes - Embedded double-quote characters must be doubled, and the field must be delimited with double-quotes.

* Embedded line-breaks - Fields must be surounded by double-quotes.

* Always Delimiting - Fields may always be delimited with double quotes, the delimiters will be parsed and discarded by the reading applications.

Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...