skip to Main Content
BEA Logo News
 
 
 

Structure of CSV (Comma-Separated Values) Files

 
 

Each csv file is a delimited text file (all fields separated by commas; quotation marks surrounding text) that is designed to be imported into a spreadsheet application.

The data in the csv files are stacked in blocks to accomodate restrictions that some software used to impose on the importation of text files. The first block contains the table title, line numbers, and line item descriptions. Below this information is the first block of data, including line numbers to allow for identification with line item descriptions. Depending on the amount of data contained in the file, additional blocks of data may follow the first data block.

Table titles, line numbers, line item descriptions, and time period designations are treated as text and are enclosed in quotation marks. Numerical data in the body of tables usually are not enclosed in quotation marks. Exceptions are made for numerical data that are accompanied by footnotes, e.g., "/16/10250," and for certain null values, e.g., "n.a.," "(*)," and "(D)."

Procedure for Importing CSV Files into a Spreadsheet Application

 
 
  1. If you are using MS Excel:
    1. You may be able to double click on the file, and it will open in Excel. If that doesn't work, open Excel and proceed to the next step.
    2. Select Open from the File menu.
    3. Select "Text Files (*.prn; *.txt"; *.csv)" in the box "Files of Type".
    4. Select the file you want to import and click on "Open".
  2. If you are using Quattro Pro:
    1. V.6 — Notebook | Text import - choose comma and quote delimited.
    2. V.5 & V.7 — Data | Text import - choose comma and quote delimited.
    3. V.8 — A six-step process:
      1. Tools | Data Tools | Quick Columns.
      2. Select the text file that you want to import.
      3. Click on Options.
      4. Change file data type to Delimited.
      5. Select delimiters (comma and quote).
      6. Click the Parse button.
      V.8 — another way:
      1. Tools | Settings | Macro then set the Slash Key entry to Quattro Pro - DOS.
      2. Slash ("/") - Tools | Import.
  3. If you are using Lotus 1-2-3— Select the keyboard slash command File Import as Numbers. (Keyboard combination /FIN). This is the easiest way to import a file in Windows Lotus as well as the DOS version.
  4. If you are using an older MS Excel— Select Open from the File menu, then click on the Text button. Select comma delimiters, then OK.