Export Technical Reference

Summary

  • The Live Data Changed Event is fired when data is changed in a Live Report (e.g. ipushpull)
  • The Export API contains functions to manage exporting and reports progammatically

Export State

The Export section of Initial Adaptable State contains details of the current Report and Report Format Type, and a collection of User-provided Report objects:

PropertyDescription
CurrentFormatSelected Report Format - in Export Toolbar & Tool Panel
CurrentReportSelected Report Type - in Export Toolbar & Tool Panel
ReportsUser-created Reports; each has Name and Row and Column Scope

Report

The Report object is defined as follows:

PropertyDescription
NameName of the Report as displayed in the Export toolbar and tool panel
QueryQuery to use; only required if ReportRowScope is 'ExpressionRows'
ReportColumnScopeColumns to display: AllColumns, VisibleColumns, SelectedColumns, ScopeColumns
ReportRowScopeRows to export: AllRows, VisibleRows, SelectedRows, ExpressionRows
ScopeColumns Scope; only required if ReportColumnScope is 'ScopeColumns'
IsReadOnlySets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')

Export Options

The Export Options section of Adaptable Options contains these properties:

PropertyDescriptionDefault
appendFileTimestampWhether to add a timestamp as a suffix to exported file namefalse
csvSeparatorSeparator for CSV exports','
customDestinationsUser-provided Report Destinations (in addition to those shipped in AdapTable)
excelSheetNameProvides a custom name for the Excel sheet when exporting to Excel'Sheet1'
exportDataFormatSets 'rawValue' or 'formattedValue' as Data format in Reports; can be set for whole grid, per Data Type, or per Column (via a function)rawValue
exportDateFormatOptional custom format for Date columns when exportingundefined
getDetailRowsFunction to provide the Detail Rows when exporting in Master-Detail grids. This function will be invoked for each master row node.
isColumnExportableWhether a Column is included in System Reports and available in UI for selectiontrue
processExportProvides custom handling of the Export process before the default export is executed.
reportFilenameProvide a bespoke file name for the Report
skipColumnHeadersWhether to exclude Column Headers from the exported datafalse
systemExportDestinationsExport destinations to use; leave unset for all, empty array for none'Download', 'Clipboard'
systemReportFormatsSystem Report Formats to use; leave unset for all, empty array for none'Excel', 'VisualExcel', 'CSV', 'JSON'
systemReportNamesSystem Reports to use; leave unset for all, empty array for none'All Data', 'Current Layout', 'Selected Data',

Export API

The Export API section of Adaptable API contains a number of functions enabling Reports to be run - and managed more generally - at run-time:

MethodDescription
canExportToCsv()If this AdapTable instance can to export to CSV; if false, the Export to Csv option will not be visible
canExportToExcel()If this AdapTable instance can to export to Excel; if false, the Export to Excel option will not be visible
clearFormat()Sets the Report Format to null
clearReport()Sets the Report to null
exportReport(reportName, format, destination, exportConfig)Exports the Report with the given Name and Format to the given Destination
getAllExportDestinations()Retrieves the available export destinations
getAllFormats()Retrieves all Report Formats that are available
getAllReports()Retrieves all available Reports - System and User-created Reports
getAvailableCustomDestinations()Retrieves available Custom Destinations (configured in Export Options)
getAvailableSystemDestinations()Retrieves available System Export Destinations (configured in Export Options)
getAvailableSystemFormats()Retrieves available System Report Formats (configured in Export Options)
getAvailableSystemReports()Retrieves available System Reports (configured in Export Options)
getCurrentReport()Retrieves currently selected Report in Adaptable State
getCurrentReportFormat()Retrieves name of currently selected Report
getCurrentReportName()Retrieves name of currently selected Report
getCustomReports()Retrieves all Custom Reports that have been created by the User
getDestinationByName(destinationName)Retrieves Destination with the given name
getExportDestinationForm(destinationName)Form Data entered by the User in the UI for a Custom Destination
getExportState()Retrieves Export section from Adaptable State
getReportById(id)Retrieves Report by Id
getReportByName(reportName)Retrieves Report with the given name
getReportData(reportName, format, config)Gets the data for the Report with the given Name in the given Format
getSupportedExportDestinations(reportFormat)Retrieves the Export Destinations that are supported for the given Report Format
isColumnExportable(adaptablColumn)Returns whether the given column is exportable
isExportDestinationSystem(destinationName)If the given destination is a System one
openExportSettingsPanel()Open Settings Panel with Export section selected
selectFormat(reportFormat)Selects the Report Format for Export
selectReport(reportName)Selects the Report in the Adaptable State
updateReport(report)Updates an existing report
updateReports(reports)Updates existing reports

Live Data Changed Event

The Live Data Changed Event is published whenever any report which contains Live Data (i.e. if using ipushpull or OpenFin plugins) is changed.

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).

PropertyDescription
pageNameFor OpenFin this is the workbook name; for iPushpull the page name
reportThe underlying Report
reportDestinationWhere the live data is being sent