CSV (and TSV) file input parsing

Current format version: 2.0

You can import CSV (comma-separated values) and TSV (tab-separated values) files onto tagtog ๐Ÿ˜ป. This also means, you can easily import any excel sheet onto tagtog ๐Ÿ“Š.

How itโ€™s parsed

An imported file is parsed as follows:

โ˜๏ธ Note: the imported file must have at least 2 rows: 1 for the header and the other for the first document. Each subsequent row is another document.

โœŒ๏ธ Note: double quotes, commas, tabs, and even new lines are accepted. This means that CSV/TSV files exported from spreadsheets applications are accepted. Special characters (e.g. newlines) are accepted as long as they are wrapped in double quotes. If we want to import the double quote character itself when the text is already quoted, then the quote has to be doubled, like in this example:

"this is one cell value with comma (,), new lines
and ""double quote""
inside"

Example

How the parsing works is best explained with an example ๐Ÿ™‚. Say you start with an Excel file (or numbers file on macOS) like the following:

Example excel


You can save the file as CSV:

Save as CSV


The file will look like this in a text editor:

CSV in text editor


Uploading that CSV file, will result in 6 documents on tagtog:

Upload CSV file


And, for example, the first document (the last on the list) will look like this:

tagtog document presentation

Note that the headers are in bold, and the paragraphs are in regular font.

Also note how the upload preserves new lines, commas, and quotes from the original spreadsheet source.