Export Technical Reference

View as Markdown

Export State

ExportState

Export section of Adaptable State, including Initial State.

Reports are reports you define. AdapTable also provides the system reports 'All Data', 'Current Layout' and 'Selected Data'. CurrentReport and CurrentFormat are the report and format selected in the Export toolbar. ReportSchedules run a report on a Schedule.

Extends

BaseState

Selected Report Format - in Export Toolbar & Tool Panel

Selected Report Type - in Export Toolbar & Tool Panel

User-created Reports; each has Name and Row and Column Scope

Scheduled Exports for System and Custom Reports

Report

Report

A report you define.

ReportColumnScope chooses the columns. Set Scope only when that is 'ScopeColumns'. ReportRowScope chooses the rows. Set Expression only when that is 'ExpressionRows'. The system reports are separate from this list.

Expression?

string

AdapTableQL boolean expression selecting the rows to export; only required if ReportRowScope is 'ExpressionRows'

Name of the Report as displayed in the Export toolbar and tool panel

Columns to display: AllColumns, VisibleColumns, SelectedColumns, ScopeColumns

Rows to export: AllRows, VisibleRows, SelectedRows, ExpressionRows

Columns Scope; only required if ReportColumnScope is 'ScopeColumns'

IsReadOnly?

boolean

Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')

ReportColumnScope is a ReportColumnScope:

Value
'AllColumns'
'VisibleColumns'
'ScopeColumns'
'SelectedColumns'

ReportRowScope is a ReportRowScope:

Value
'AllRows'
'VisibleRows'
'ExpressionRows'
'SelectedRows'

Scope is a Column Scope:

ColumnScope

Which columns an object applies to. Set exactly one shape.

One of

Matches every column. All must be true.

{ DataTypes }

('text' | 'number' | 'boolean' | 'date' | 'textArray' | 'numberArray')[]

Data types to match, for example ['number'] or ['text', 'textArray']. Object, tuple and unknown columns are not scope data types. Name those columns with ColumnIds.

Column ids to match. These are AG Grid colId values.

AG Grid column type names, the strings set on colDef.type.

Schedules

ReportSchedule

A timed export for a report — when to run, format and destination

Destination of Report to run on Schedule

Name

string

Unique display name for this scheduled report

Format of Report to run on Schedule

Name of Report to export

When the export should run

IsReadOnly?

boolean

Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')

IsSuspended?

boolean

Suspends (i.e. turns off) an Adaptable Object

Schedule

When a scheduled alert or export runs.

IsOneOff: true runs once at RunAt (an ISO date-time). IsOneOff: false repeats on CronExpression, a 5-field cron (minute, hour, day of month, month, day of week). Weekdays in that cron are 0–6 with Sunday as 0; 1-5 is Monday to Friday.

Standard 5-field cron (minute hour day-of-month month day-of-week); e.g. weekdays at 09:30 → 30 9 * * 1-5

IsOneOff

boolean

true runs once, at RunAt. false repeats on CronExpression.

RunAt?

string

ISO datetime for a one-off run (local time); set when IsOneOff is true


Export Options

ExportOptions

Options regarding Exporting data from AdapTable

Whether to add a timestamp as a suffix to exported file name

Default

false

csvSeparator?

string | ((csvSeparatorContext:BaseExportContext) => string)

Separator for CSV exports

Default

','

User-provided Report Destinations (in addition to those shipped in AdapTable)

excelSheetName?

string | ((excelSheetNameContext:BaseExportContext) => string)

Provides a custom name for the Excel sheet when exporting to Excel

Default

'Sheet 1'

Sets 'rawValue' or 'formattedValue' as Data format in Reports; can be set for whole grid, per Data Type, or per Column (via a function)

Default

rawValue

exportDateFormat?

string | ((context:ExportDateFormatContext<TData>) => string)

Optional custom format for Date columns when exporting

Default

undefined

getDetailRows?

(context:GetDetailRowsContext<TData>) => CsvDetailRow[] | ExcelDetailRow[] | undefined

Function to provide the Detail Rows when exporting in Master-Detail grids. This function will be invoked for each master row node.

Whether a Column is included in System Reports and available in UI for selection

Default

true

processExport?

(processExportContext:ProcessExportContext) => Promise<ExportResultData | boolean>

Provides custom handling of the Export process before the default export is executed.

reportFilename?

(reportFileNameContext:ReportFileNameContext) => string

Provide a bespoke file name for the Report

skipColumnHeaders?

boolean | ((skipColumnHeadersContext:BaseExportContext) => boolean)

Whether to exclude Column Headers from the exported data

Default

false

Export destinations to use; leave unset for all, empty array for none

Default

'Download', 'Clipboard'

System Report Formats to use; leave unset for all, empty array for none

Default

'Excel', 'VisualExcel', 'CSV', 'JSON'

System Reports to use; leave unset for all, empty array for none

Default

'All Data', 'Current Layout', 'Selected Data',

systemReportFormats values are Excel, VisualExcel, CSV, and JSON.

systemReportNames values are All Data, Current Layout, and Selected Data.

systemExportDestinations values are Download and Clipboard.

exportDataFormat is 'rawValue' or 'formattedValue'.

customDestinations entries are a CustomDestination:

form on a custom destination is an AdaptableForm:

AdaptableForm

Expand

Defines the form. fields is a list of fields, rows of fields, or field groups. buttons are the form buttons. layout is rows (the default) or inline.

AdaptableForm

Defines a form which appears dynamically; used by Alerts, Export Custom Destinations and Dashboard Custom Toolbars.

Buttons to include in the Form

Additional information to appear in the Form

Collection of Dynamic Fields and Field Groups to display.

Items can be:
- a single (rendered on its own row in the
default rows layout, or as one cell in the inline layout),
- an array of (rendered side-by-side on the
same row in the rows layout), or
- an (a labelled section that
visually groups related fields).

How the form's fields are arranged on screen.

- rows (default): each field on its own row, label on the left and
input on the right. Suitable for popups / wizards.
- inline: fields are placed side-by-side on a single horizontal line,
with the label rendered immediately before its input. Designed for
compact contexts such as Dashboard Custom Toolbars where vertical
real-estate is scarce.

Default

'rows'

onSubmit?

(formData: TData, context: T) => void

Optional form-level submit hook.

Fired when the user presses Enter while focus is inside any field
input AND the form is currently valid. The full formData is passed
through, typed as TData if you've supplied a custom shape.

Use this as an ergonomic shortcut to avoid wiring an explicit "Submit"
button - or in addition to one, so power users can press Enter to
commit. If the form is invalid the hook is not invoked.

title?

string

Title to appear in the Form

Each field is an AdaptableFormField:

AdaptableFormField

Defines a Field that appears in an Adaptable Form

For single select fields only. When the user clears the combobox,
whether to restore instead of leaving the field empty.

Defaults to true when defaultValue is set, otherwise false.
Set to false when an empty selection is a distinct state from the default.

defaultValue?

string | boolean | number | Array<string | number | boolean>

Field Default Value - can be of type string, boolean, number, or for
select fields with multi: true an array of those.

For single select fields, this is also the value restored when the user
clears the combobox (unless is false).

disabled?

boolean | ((formData:AdaptableFormData, context:BaseContext) => boolean)

Disable the field's input. Either a boolean or a function evaluated
against the current form data. Disabled fields render but the user
cannot edit them.

Field Type - dictates which UI control is rendered

helpText?

string

Inline help text rendered immediately below the field's input. Useful
for short explanations such as "format: YYYY-MM-DD" or "min 3 chars".

hidden?

boolean | ((formData:AdaptableFormData, context:BaseContext) => boolean)

Hide the field. Either a boolean or a function evaluated against the
current form data. Hidden fields are not rendered and are excluded from
validation.

label

string

Label to display in the Field

max?

number | string

Maximum allowed value. For number and slider: the highest accepted
number. For date, time and datetime: the latest allowed value in
ISO format.

maxLength?

number

Maximum length for text and textarea fields.

min?

number | string

Minimum allowed value. For number and slider: the lowest accepted
number. For date, time and datetime: the earliest allowed value
in ISO format (YYYY-MM-DD / HH:mm / YYYY-MM-DDTHH:mm).

minLength?

number

Minimum length for text and textarea fields.

multi?

boolean

For select fields only. When true the field renders as a
multi-select combobox; the field's value is an array of selected
option.values rather than a single value.

Default

false

name

string

Name of the Field

onValueChange?

(value: any, context:BaseContext) => void

Optional callback invoked whenever value of this field changes

Items to populate the select and radio fieldTypes.

Either a static array, or a function that derives the options from the
current form data and Adaptable context. The function form may return
a Promise for asynchronously-loaded options - the form will render the
field with no items until the promise resolves.

pattern?

string

Regular expression that the value of a text field must match.

Placeholder text shown inside text, textarea, number, date,
time and datetime inputs when empty. For select fields it is
rendered as the empty-state label when no value is selected.

When omitted on a select field with a , the label of
the matching options entry is used as the empty-state label.

render?

(params:AdaptableFormFieldRenderParams) => React.ReactNode

For custom fields only. Renders an arbitrary React node as the
field's input. Receives the current value, a setValue setter
(controlled), the current form data, the Adaptable context and the
resolved disabled state.

Use this as an escape hatch when none of the built-in fieldTypes
fit - e.g. to render a star-rating widget, a tag editor or any
bespoke control.

required?

boolean

If true the field is treated as required. An empty value ('',
null, undefined, or unchecked checkbox) will produce a validation
error.

rows?

number

For textarea fields: the visible number of text rows.

Default

3

step?

number

Stepping interval for number, slider, time and datetime
fields.

tooltip?

string

Tooltip shown when hovering the field's label.

validate?

(value: any, formData:AdaptableFormData, context:BaseContext) => string | null | undefined

Custom field-level validation. Return an error message string to mark
the field invalid, or null/undefined if the value is valid.

Custom validation runs after built-in checks (required, min,
max, pattern, etc.) - the first failing check wins.

fieldType is an AdaptableFormFieldType:

Value
'text'
'textarea'
'select'
'radio'
'date'
'time'
'datetime'
'number'
'slider'
'color'
'checkbox'
'textOutput'
'custom'

Select and radio options are AdaptableFormFieldOption objects:

AdaptableFormFieldOption

One choice in a select or radio form field.

label

string

Text shown for this choice.

Value written into the form data when this choice is selected.

layout is an AdaptableFormLayout:

Value
'rows'
'inline'

buttons are AdaptableButton objects:

AdaptableButton

A button on a form, alert or toolbar.

label is the text. onClick runs when it is clicked and receives the button and the form or event context. buttonStyle and icon are optional. disabled and hidden are functions that return whether the button is disabled or hidden.

buttonStyle?

ButtonStyle| ((button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) =>ButtonStyle)

Style for Button - can be object or function that provides a ButtonStyle object

disabled?

(button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => boolean

Function that disables / enables the button based on its evaluation result

hidden?

(button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => boolean

Function which sets whether Button is hidden

icon?

AdaptableIcon| ((button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) =>AdaptableIcon)

Icon for Button - can be object or function that provides a AdaptableIcon object

iconPosition?

'start' | 'end'

Where the icon appears relative to the label

Default

'start'

label?

string | ((button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => string)

Label for Button - can be string or function that provides string

onClick?

(button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => void

Function to invoke when button is clicked

tooltip?

string | ((button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => string)

Tooltip for Button - can be string or function that provides string

buttonStyle is a ButtonStyle:

ButtonStyle

Appearance of an AdapTable button.

variant is 'text', 'outlined' (the default) or 'raised'. tone is the colour: 'neutral' (the default), 'success', 'error', 'warning', 'info', 'accent' or 'none'. className adds a CSS class.

className?

string

CSS Classname to use for the Button

tone?

'success' | 'error' | 'neutral' | 'none' | 'warning' | 'info' | 'accent'

Button's Tone - values: 'success', 'error', 'neutral', 'none', 'warning', 'info', 'accent'

Default

'neutral'

variant?

'text' | 'outlined' | 'raised'

How Button appears - values: 'text', 'outlined', 'raised'

Default

'outlined'

getDetailRows receives a GetDetailRowsContext:

GetDetailRowsContext

Context provided to ExportOptions.getDetailRows() callback used when exporting Detail Rows

Column of Master Row Node

createCellCsv

(cellContent: any) => CsvCell

Factory function to create a CSV Cell

createCellExcel

(cellContent: any, cellType: ExcelDataType) => ExcelCell

Factory function to create an Excel Cell

createCellHeader

(cellContent: any) => ExcelCell

Factory function to create an Header Cell (either CSV or Excel)

isExpanded

boolean

Whether the Master Row Node is expanded

Data of Master Row Node

masterRowNode

IRowNode<TData>

Master Row Node

Custom application Context provided in AdaptableOptions.adaptableContext

processExport receives a ProcessExportContext:

reportFilename receives a ReportFilenameContext:


Export API

ExportApi

Reports and scheduled exports: which report and format are selected, where a report can be sent, and running or scheduling an export.

Adds a schedule that runs a report on a cron expression or at one time.

Runs a scheduled export now and records that the job ran.

canExportToCsv()
returns

boolean

Whether this instance can export to CSV.

canExportToExcel()
returns

boolean

Whether this instance can export to Excel.

clearFormat()
returns

void

Sets the Report Format to null

clearReport()
returns

void

Sets the Report to null

Removes a scheduled report.

Replaces a scheduled report already in state.

Ensures every scheduled report has a unique Uuid (legacy state may omit them).

Exports the Report with the given Name and Format to the given Destination

Scheduled reports that are not suspended.

Retrieves the available export destinations

Every report format that can be selected, system and custom.

Retrieves all available Reports - System and User-created Reports

Custom destinations supplied in Export Options.

System destinations that Export Options allow.

System report formats that Export Options allow.

System report names that Export Options allow.

getCurrentReport()
returns

Report | undefined

Retrieves currently selected Report in Adaptable State

Format currently selected for export.

Name of the report currently selected for export.

Reports created by the user. System reports are not included.

Retrieves Destination with the given name

The form a custom destination shows before export.

The Export section of Adaptable State.

Retrieves Report by Id

Retrieves Report with the given name

Gets the data for the Report with the given Name in the given Format

A scheduled report looked up by its id.

Every scheduled report, including suspended ones.

Retrieves the Export Destinations that are supported for the given Report Format

Whether a column is included in an export.

Whether the destination is one AdapTable provides (Download or Clipboard) rather than a custom destination.

Open Settings Panel with Export section selected

Selects the report format used by the next export.

Selects the Report in the Adaptable State

Stops a schedule from running until it is unsuspended.

Makes a suspended schedule run again.

Updates an existing report

Replaces the given custom reports in Export State.


Report Schedule Ran Event

The Report Schedule Ran Event is published whenever any report runs on a Schedule.

The ReportScheduleRanInfo provides full information on the Report and the Schedule:


Live Data Changed Event

The Live Data Changed Event is published when a live report for the ipushpull or OpenFin plugins connects, disconnects, sends a snapshot, or starts, stops or updates.

The payload is a LiveDataChangedInfo object:

LiveDataChangedInfo

Payload of the LiveDataChanged event.

Fires for the ipushpull and OpenFin live-report plugins: when the destination connects or disconnects, a snapshot is sent, or live data starts, stops or is pushed.

Extends , so adaptableApi is included.

liveDataTrigger

'Connected' | 'Disconnected' | 'SnapshotSent' | 'LiveDataStarted' | 'LiveDataStopped' | 'LiveDataUpdated'

What happened:
- Connected — the destination session started. liveReport is omitted.
- Disconnected — the destination session ended. liveReport is omitted.
- SnapshotSent — a one-off snapshot was sent. liveReport is omitted.
- LiveDataStarted — a report started streaming. liveReport is that report.
- LiveDataStopped — streaming stopped. liveReport is the report that was live.
- LiveDataUpdated — a new snapshot of the live report was pushed. liveReport is that report.

The ipushpull or OpenFin report this change is about.

Set for LiveDataStarted, LiveDataStopped and LiveDataUpdated. Omitted for Connected, Disconnected and SnapshotSent.

This is the plugin report (an ipushpull report or an OpenFin report), not a .

reportDestination

'OpenFin' | 'ipushpull'

Destination this change belongs to: OpenFin or ipushpull.

Custom application Context provided in AdaptableOptions.adaptableContext

Live Report

The Live Report defines which Adaptable Reports are 'Live' (i.e. they will update the destination as the data in Adaptable ticks or changes):

Note

When Adaptable creates a Live Report it will take care of updating the destination as the data in the Report changes (based on the throttle time it is given).

LiveReport

Defines which Adaptable Reports are 'Live' (i.e. will update the destination as data in Adaptable ticks or changes)

pageName

string

For OpenFin this is the workbook name; for iPushpull the page name

The underlying Report

reportDestination

'OpenfinExcel' | 'ipushpull'

Where the live data is being sent.

OpenfinExcel is the OpenFin value on this object. uses OpenFin for the same destination.