How To Use Tab Separated Value (TSV) Files

Data tables are presented in text file format (tab delimited). Although this file format allows for the data table to be easily retrieved into a variety of applications, they are best viewed within one that will allow one to easily manipulate data that is in columnar format. Common examples of such applications are those that are used to create spreadsheets and databases.

If you don't have access to either a spreadsheet or a database application, you can also retrieve the data table file into either an ASCII text-editing or a word-processing application. However, since neither of these two application types has the facility to easily format the width of the data columns, quite a bit of manual reformatting will be required to properly view the data.

To Save a Data Table to Disk

To save a data table to disk, highlight the File link, right-click, and then select "Save Target As." Make sure that you save the file as Text Document.

File Saving Tip:

If you want to save the data table to a diskette, check its file size beforehand to confirm that it will fit on the diskette.

1. Open the data table for viewing.
2.Click on File/Properties. (Alternatively, you can right-click anywhere within the table and select "Properties".) Included in the properties displayed will be the file's size.

 

To Retrieve a Data Table in to a Spreadsheet Application or Import the Data Table into a Database Application

To retrieve the data table into a spreadsheet application, proceed with the steps that you normally go through to open an existing spreadsheet.

To import the data table into a database, create a new table and then import the data table file into the newly created database table.

Note that because the data table is formatted as a Tab delimited Text Document, you may be prompted to set the file import options, which will ensure that the data is properly formatted when the file is retrieved into the spreadsheet or imported into the database table. The key file import options and their associated values are listed in the table below.

Import Option Value
Data Type Text
File Origin Windows ANSI
Text Qualifier {"}
Field Delimiter {Tab}
First Row Field Names

Additionally, please note that null field values may be represented by the phrase "n.a." You may need to replace all instances of "n.a." with a blank field before importing the data table into your spreadsheet/database.

Tips:
  • Once you've retrieved/imported the data table, immediately save it to disk before making any formatting changes. This will avoid the need to reimport it should you run into problems formatting the table. Remember to save the file in the native format of the spreadsheet/database package rather than as a text file.
  • All fields, except those that contain numbers, should be specified as field type = text.
  • Numeric fields that contain "n.a." field values should have a numeric field type. When selecting which numeric field type to use, keep in mind that the field type you select will determine the decimal precision of the field. Decimal precision will, in turn, determine the amount of disk space that is allocated to the data stored in that field. In general, the greater the degree of decimal precision required, the more disk space that is needed to store the field value. If the overall size of the database is of a programmatic concern to you, choose your numeric fields carefully.
  • To print the entire data table, you may need to maximize your page format settings as follows:
Format Setting Value
Page Size Legal
Page Orientation Landscape
Font Type Any proportional font such as Line Printer, Arial, or Universe. A fixed font such as Times Roman or Courier will increase the required line length.
Font Size 8 point or smaller
Margins Left = 0"
Right = 0"
Actual margin width will be set to the lowest default value for your printer.

To Retrieve a Data Table into an ASCII Text Editor or Word-Processing Application

To retrieve the data table into either an ASCII text editor or word-processing application, proceed with the steps that you normally go through to open a text file or document.

If you are retrieving the data table into a word-processing application, you may be prompted to convert the file format. If yes, indicate that you are converting from "ASCII Text."

Tips for Retrieving a Data Table into a Word-Processing Application:
  • Once you've retrieved/imported the data table, immediately save it to disk before making any formatting changes. This will avoid the need to reimport it should you run into problems formatting the table. Remember to save the file in the native format of the spreadsheet/database package rather than as a text file.
  • The data columns will be enclosed by double quotes; you can search and remove instances of double quotes.
  • To view and/or print an entire data table, you may need to adjust the document's tab settings so that the columns display correctly. Also, you may need to maximize your page format settings as follows:
Format Setting Value
Page Size Legal
Page Orientation Landscape
Font Type Any proportional font such as Line Printer, Arial, or Universe. A fixed font such as Times Roman or Courier will increase the required line length.
Font Size 8 point or smaller
Margins Left = 0"
Right = 0"
Actual margin width will be set to the lowest default value for your printer.