files and formats

Delimiter and header row

How Trusty CSV finds out the character between values and whether the first row has the names of the columns, and how to change either.

The delimiter

CSV means comma-separated values, but many files use another character: semicolons are the rule in countries that write decimals with a comma, tabs in files copied from spreadsheets, pipes in exports from some databases. When it opens a file, Trusty CSV tries the four and picks the one that splits every row into the same number of values; with a tie, the one that gives more. A .tsv or .tab file is always tab-separated.

The delimiter it found is in the status bar, the character and its name (; Semicolon). To change it:

  • Table › Delimiter has Comma, Semicolon, Tab and Pipe, and Other… for any other character (type it; \t is a tab).
  • A click on the delimiter in the status bar lists them too, with Detect again.
The list that a click on the delimiter in the status bar opens: Comma, Semicolon (highlighted, the one in use), Tab, Pipe, Other… (type a character) and Detect again (from the file’s content)

Changing the delimiter doesn’t change the file: it changes how the file is read. To turn a semicolon-separated file into a comma-separated one, save a copy in another format: see Saving.

The header row

Trusty CSV also works out whether the first row holds the names of the columns, the way a person does: if the first row is text in columns where the rest are numbers, dates or the like, it is a header. When every column is text it is harder to tell: it compares the first row with the others, and can guess wrong.

Table › First Row Is Header, or the Header row switch in the status bar, changes it. What the header row does is in Columns and colours.

Lines above the table

Exports from banks, public bodies and accounting programs often start with a title, a few notes (Account Number:;12345) or blank lines before the header row. Trusty CSV looks for them when it opens a file: it reads the delimiter and the header row from the table, below them, and says how many lines there are above it, with a Remove Them button. Removing them is one step of Ctrl+Z⌘Z.

A bank statement open in Trusty CSV: lines 1 to 4 are a title, the account number, the period and a blank line, and the table starts at line 5 with Date, Description, Amount and Balance. A message at the bottom right says: statement.csv has 4 lines above the table: a title or notes, not rows, with a Remove Them button. The status bar shows the Semicolon delimiter and the Header row switch on

It only says so when it is sure: the lines above have to look like a title or notes (words, fewer values than the rows of the table, or a blank line between them and the table), and the table has to start with a header row. A file whose first rows are just short rows has no lines above its table. The Quality Check lists them too, first, with the same fix.

When it doesn’t find them, or for any other rows at the top, put the cursor in the row that should be the first and choose Rows › Delete Rows Above the Cursor: every line above it goes. After either, the delimiter and the header row are detected again, unless you had chosen them by hand.

A header of several rows

A spreadsheet can write the names of the columns in two rows or more: 2025 Sales over three columns, and Q1, Q2, Q3 below. Columns › Header Names › Join Header Rows… makes them one row: each column’s name is what those rows have in it, top to bottom, joined with a space (or what you type), so the columns are 2025 Sales Q1, 2025 Sales Q2… A window shows the first rows as they will be before anything changes.

  • Join says how many rows from the top: two by default.
  • A blank cell in an upper row takes the value at its left, checked by default: a spreadsheet writes a cell merged across columns in the first of them, and leaves the others blank. Uncheck it when the blanks really are blanks.
  • Empty parts are left out, and so is a part the same as the one above it.

The joined row is the header row: if the file wasn’t read with one, it is now. It is one step of Ctrl+Z⌘Z. If there are lines above the header, remove them first.

Detecting again

Table › Delimiter › Detect Again looks at the file again and says what it found: Detected: semicolon delimiter, with header row. It is useful after pasting a different table into a tab, or after a choice by hand that turned out wrong.

New files

A new file, or a file that was empty, has no content to look at when it opens. So it takes its delimiter and header row from what you type or paste into it, as you go, until you choose one of them by hand: from then on, your choice stays.