Tab-Separated Values TSV is a format of storing database information in which each record contains only one line. The tab stop character separates each field value of a row from the next row. For example, if you export a database table in TSV format into a text file, each row would take one line in the text editor. If there are 10 rows in the database table, the text file would also have 10 separate lines. Tab-Separated Values are mainly used for transferring information from a database program such as MySQL to a spreadsheet. Both MS Excel and Google Sheets support Table-Separated Values; users can convert spreadsheets into TSV format.
For Google Sheet:
If you created a separate on Google Sheet and want to export it in Tab-Separated Values format then click on File > hover over Download and from drop down click on Tab-separated values (.tsv, current sheet). It will download a spreadsheet with .tsv extension. If you don’t have a program to view a TSV file then change the downloaded file’s extension to .txt and open with Notepad.
For Microsoft Excel:
When you have to export click on the File menu and then Save as... -from Save as type drop-down box, choose Text (tab delimited) (*.txt) option. Save it. (A warning message may prompt, if so, select Yes or OK button).
Let’s say for a database table as below one:
Name | Post | Salary |
---|---|---|
David | CEO | 35K |
John | Manager | 20K |
Mitchel | HRM | 10K |
A tab-separated values format text file would be like:
Name Post Salary
David CEO 35K
John Manager 20K
Mitchel HRM 10K
(Note: HTML rendering may turn tabs into spaces.)