Spanish Total.js
English
Documentation For AI agents
Contents

Export a table or a result

Save the rows of a table, or the result of a query, to a file for a spreadsheet, for a program or for another database.

.md GitHub
On this page

Export a table

  1. Open the table, and filter or sort it if you want.
  2. Press Export the table…, the arrow at the bottom.
  3. Choose the Format, and press Choose where…

Every row that passes your filters is written, not only this page, in the order that you chose. Changes not saved do not go into the file. Views are exported in the same way.

While a large table is written, the rest of that connection waits.

Export a result

In a query, press Export… above the result. If the query returned more rows than the result keeps, only those kept are written, and the dialog says so. To have them all, export the table or a view.

To paste a result in a spreadsheet without a file, press Copy the result, to paste in a spreadsheet.

The formats

FormatWhat it isFrom
CSVCommas, in UTF-8, with the names of the columns in the first lineTables and results
CSV for ExcelThe same, with the mark that Excel needs to read accentsTables and results
JSONA list with an object for each rowTables and results
SQL (INSERT statements)An INSERT for each row, in the dialect of the databaseTables

How values are written

  • In CSV, NULL is an empty field, and an empty text is "", so you can tell them apart.
  • In JSON, numbers keep all their digits, yes and no are true and false, and the JSON of a column goes in as JSON.
  • Binary values are written in hexadecimal.
  • In INSERT statements, the columns that the database computes are left out.

The separator of both CSV formats is the comma. If your spreadsheet expects another one, import the file and choose the comma there.

If it fails

The file takes its place only when it is complete. If an export fails, there is no half file, and one with the same name stays as it was.

A whole database

To take all the tables with their structure, make a copy of the database.

Made in Europe