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.

 
Free Stylus Studio XML Training: