home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / public_html / csv.html.~1~ < prev    next >
Text File  |  2010-04-06  |  790b  |  23 lines

  1. How to split a comma-separated list...
  2.  
  3. Comma-Separated Value (CSV) format is commonly output by spreadsheets
  4. and databases when dumping data into plain-text files.  It is important
  5. to understand the formal definition of a CSV file.
  6.  
  7. Each record is a series of fields.
  8.  
  9. Records are separated by line terminators (CR, LF, or CRLF, depending
  10. on the underlying file-system text format).
  11.  
  12. Fields within records are separated by commas and perhaps also spaces.
  13.  
  14. Fields with imbedded commas are enclosed in ASCII doublequote characters.
  15.  
  16. Fields with leading or trailing spaces are enclosed in ASCII doublequotes.
  17.  
  18. Fields with embedded doublequotes are enclosed in doublequotes and each
  19. interior doublequote is doubled.
  20.  
  21. aaa,bbb,ccc,,"ddd,eee,fff",ggg,hhh," iii ","Muhammad ""The Greatest"" Ali"
  22.  
  23.