invantive documentationpart of invantive cloud
Invantive Support ForumsLog In / Sign Up

Exporting Results

The button "Export" on the toolbar of the results writes the result of the query tab to a file or to the clipboard. The menu behind it lists the formats, and the choice of a format opens the window "Query Export" with the options which that format has.

The formats fall in two kinds. The formats of the first kind write what the grid shows, so a filter, a sort, hidden columns, groups and summaries are in the file as they are on the screen. The formats of the second kind write the complete result of the statement. The export of the grid follows the export of Invantive Query Tool for Microsoft Windows and is available from release 28.0.

The Menu

The menu lists the formats which the user may use. The right to use a format is a function right of its own for every format, so a menu can hold fewer entries than the list below. When the user may use none, the menu holds one entry which is not available, and its tool tip explains the missing right. The entries are:

  • "Export to Microsoft Excel..."
  • "Export to Delimited Text (CSV)..."
  • "Export to Tab-delimited Text (TSV)..."
  • "Export to Plain Text..."
  • "Export to XML...", "Export to JSON...", "Export to NDJSON..." and "Export to JSON Data Set..."
  • "Export to Insert Statements (SQL)...", "Export to Select Statements (SQL)..." and "Export to Create Table Statement (SQL)..."

The Window Query Export

The window names the format at the top: The export options of Invantive Query Tool Multi-Platform for Microsoft Excel, with output choices and a row limit option.

The options depend on the format:

  • "Output" is "Clipboard", "File" or "File and Open". "File and Open" opens the file in the application of the operating system which is registered for it. The clipboard is only offered for the formats which are text.
  • "Include column headers" writes the captions of the columns on the first line. It applies to Microsoft Excel and to the text formats.
  • "SQL Statement" adds the statement which produced the rows, so the file says where it came from. It applies to Microsoft Excel, XML, JSON and JSON Data Set.
  • "Limit Number of Rows" and "Maximum Number of Rows" write only the first rows of the result. The box takes digits only.
  • "Field Separator" and "Quoting Character" apply to the text formats; they start with a comma and a double quote.
  • "Name of Target Table" applies to the three SQL formats, which take the name of the table from the name of the file when it is left empty, with spaces replaced by underscores.

"OK" asks for the name of the file and writes it, and "Cancel" closes the window.

Formats Which Follow the Grid

Microsoft Excel, CSV, TSV and plain text are written from what the grid shows: the columns in the order of the grid, the rows in the order and the filter of the grid, and the groups. Columns which are hidden are not written. The limit on the number of rows is applied first, so the counts and the summaries in a file are those of the rows which are in it.

Microsoft Excel writes a workbook with the following contents:

  • A sheet "Results 1" with the captions on the first row, which stays in view when scrolling.
  • Typed cells: a whole number is formatted as #,##0, a number with decimals as #,##0.00 with the number of decimals of the column, and a date with a time as yyyy-mm-dd hh:mm:ss. A yes or no value is a boolean cell, and an empty value is an empty cell.
  • When the rows are grouped, a row for every group with its caption and its count, the summaries of the group in the columns they belong to, and the rows of the group one outline level deeper. The summaries are numbers: a cell holds 22.5 with the caption Sum = in its number format, so the cell can still be added up.
  • A row "Grand Summaries" at the end, when a summary is chosen.
  • With the option "SQL Statement", a second sheet "SQL Statement" with the statement.

A sheet holds at most 1,048,576 rows and 16,384 columns. A larger result is refused before anything is written.

CSV, TSV and plain text write the values in a form which another program reads back, and not the text of the cells. A number is written with a point as the decimal separator and no thousands separator, a date as 2026-10-02, a yes or no value as True or False and an empty value as nothing. With the statement of Results, filtered to the amounts above 3 and grouped on CATEGORY, "Export to Delimited Text (CSV)" writes the rows in the order of the groups:

id,CATEGORY,AMOUNT,DAY_VALUE,FLAG
3,Alpha,3.75,2026-10-04,True
6,Alpha,7.5,2026-10-02,True
9,Alpha,11.25,2026-10-05,True
7,beta,8.75,2026-10-03,False
10,beta,12.5,2026-10-01,False
5,Gamma,6.25,2026-10-01,False
11,Gamma,13.75,2026-10-02,False

With "Limit Number of Rows" set to 3, the file holds the header and the first three of these rows.

Formats Which Write the Statement

XML, JSON, NDJSON, JSON Data Set and the three SQL formats run the statement of the tab once more and write the complete result, as the Windows product does. They do not follow the view, so a filter, a sort or a hidden column has no effect on the file. A document or an image is written as it is, and not as the text (BLOB) of the grid.

Consequences of running the statement again:

  • The bar with the progress and the button "Cancel" appears again. Cancelling leaves a file which may be incomplete.
  • A statement with a side effect is run a second time.
  • The export is unavailable after "Execute All" and when the statement produced no result set, since there is no single statement to run again.

Row Limits of the Licence

Microsoft Excel, CSV, TSV and plain text are checked against the licence for the number of rows. A result of more than 10 rows asks the licence for the function with the extension _over_10 of the format, a result of more than 100 rows asks also for _over_100, and a result of more than 1,000 rows asks for _over_1000 as well, the lowest first. The count is the number of rows which are written, so a limit chosen in the window counts. The first function which the licence does not grant gives the refusal, which names the tier. Nothing is written before the check.

The check asks every tier a count is over. The Windows product asks only the first tier, so the two products differ for a licence which grants some tiers and not others. No licence does today.

Formats Not Available

PDF, Microsoft Word, XPS, HTML and RTF are not offered, and neither is printing. Those formats need renderers which are only available in the Microsoft Windows products; use Invantive Query Tool for Microsoft Windows when they are needed. See Limitations.

Release Notes