The TXT (Text Separated by Tabs) or TSV (Tab Separated Values), is a simple text data that allows tabular data to be exchanged between applications with a different internal format. Values separated by tabs have been officially registered as a MIME type (Multipurpose Internet Mail Extensions) under the name text/tab-separated-values.
The characteristics of these files are the following:
A file in TXT format consists of lines. Each line contains fields separated from one another by the tab character (horizontal tab, HT, code control 9 in ASCII).
Fields can be any string of characters, excluding tabs. However, tabs usually don't appear in data items that you wish to tabulate, so this is seldom a restriction. There are various other formats which are very similar to TSV but use a different separator, such as Comma Separated Values (CVS) which uses the comma as separator. Commas, spaces, and other characters often used as separators in such formats appear rather often in data to be tabulated, at least in header fields.
Each line must contain the same number of fields.
The first line contains the name of the fields or attributes, i.e. the column headers.
An empty value is displayed as an empty field between tabs.
Such files can be read and edited by any text editors.
Although TSV is a text format, this type of format is not expected appearing with a nice tabular format when it is printed with an editor or left on the screen.
The extension for this type of file is ".txt" or ".tsv".
The TXT (Text Separated by Tabulators) or TSV (Tab/Text Separated Values) data files must have the following format:
attribute1<TAB>attribute<TAB>...<TAB>attributeN value11<TAB>value12<TAB> ... <TAB> value1N ... valueM1<TAB>valueM2<TAB> ... <TAB>valueMN |
One example of valid TXT or TSV file is the following:
FirstName
<TAB> LastName
<TAB> Company
<TAB> EmailAddress Johnathan <TAB> Doe <TAB> ABC Company <TAB> johndoe@abccompany.com Harrie <TAB>Wong <TAB>Company <TAB> Inc. hwong@myprovider.com Mary <TAB> Jo Smith <TAB> Any <TAB> Corp <TAB> mjsmith@myprovider.com" |