About CSV File Contents

In a CSV file, a new line character flags each row of the table. A comma delimits each column within that row. For this scheme to work, all lines in the file must contain the same number of values. For example:

Albert,Archer,1 Alpine St,Acton,MA
               
Blaine,Baker,2 Bedford Rd,Burlington,MA
               
Claire,Claus,3 Charlotte Ave,Cambridge,MA
               

            

In a fixed-width file, a new line character also flags each row of the table. However, the width of a particular column is the same in each row. For example:

AlbertArcher1 Alpine St    Acton     MA
               
BlaineBaker 2 Bedford Rd   BurlingtonMA
               
ClaireClaus 3 Charlotte AveCambridge MA
               

            

Delimiting Commas

If a value in a CSV file contains a comma, you must enclose the value in a pair of quotation characters. You can choose the character that you want to use as the quotation character. The default is to use double quotes:

Dan,Davidson,"4 Denver St, Apt 4",Dover,MA
               

            

If the character you use as the quotation character appears in a value that is enclosed in quotation characters, you must double each enclosed quotation character. For example:

Eugene,"""Ed"" Everett, Jr.",5 Easy St,Edgartown,MA
               

            

If you want, you can include the names of the columns in the file. If you do, they must be the first row of data. For example:

First,Last,Street,City,State
               
Albert,Archer,1 Alpine St,Acton,MA
               
Blaine,Baker,2 Bedford Rd,Burlington,MA
               
Claire,Claus,3 Charlotte Ave,Cambridge,MA
               

            

If there are any invalid characters in XML tag names, the wizard replaces the invalid character with an underscore.

XML Videos

Stylus Studio online XML video demonstrations illustrate how easy it is to learn advanced XML editing techniques. Now playing: Java Code Generation, Convert to XML, Grid View, and many other informative video demonstrations.

DataDirect XML Converters

DataDirect XML Converters are high-performance Java components which provide bi-directional, programmatic access to virtually any data source as XML.

Learn XQuery in 10 Minutes, by Dr. Michael Kay - An XQuery Tutorial

Learn XQuery in 10 Minutes By Dr. Michael Kay is for all those people who really want to know what XQuery is, but don't have the time to find out. It's the fastest XQuery tutorial on the planet - read it now!

XML Syntax Help - Intelligent XML Editing

Stylus Studio's XML Editors feature Intelligent XML Schema/DTD-Aware Code Sensing and context sensitive XML code auto-completion. Simplify XML editing with Stylus Studio today.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member