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:
| Property | Description |
|---|---|
| CurrentFormat | Selected Report Format - in Export Toolbar & Tool Panel |
| CurrentReport | Selected Report Type - in Export Toolbar & Tool Panel |
| Reports | User-created Reports; each has Name and Row and Column Scope |
Report
The Report object is defined as follows:
| Property | Description |
|---|---|
| Name | Name of the Report as displayed in the Export toolbar and tool panel |
| Query | Query to use; only required if ReportRowScope is 'ExpressionRows' |
| ReportColumnScope | Columns to display: AllColumns, VisibleColumns, SelectedColumns, ScopeColumns |
| ReportRowScope | Rows to export: AllRows, VisibleRows, SelectedRows, ExpressionRows |
| Scope | Columns Scope; only required if ReportColumnScope is 'ScopeColumns' |
| IsReadOnly | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full') |
Export Options
The Export Options section of Adaptable Options contains these properties:
| Property | Description | Default |
|---|---|---|
| appendFileTimestamp | Whether to add a timestamp as a suffix to exported file name | false |
| csvSeparator | Separator for CSV exports | ',' |
| customDestinations | User-provided Report Destinations (in addition to those shipped in AdapTable) | |
| excelSheetName | Provides a custom name for the Excel sheet when exporting to Excel | 'Sheet1' |
| exportDataFormat | Sets 'rawValue' or 'formattedValue' as Data format in Reports; can be set for whole grid, per Data Type, or per Column (via a function) | rawValue |
| exportDateFormat | Optional custom format for Date columns when exporting | undefined |
| getDetailRows | Function to provide the Detail Rows when exporting in Master-Detail grids. This function will be invoked for each master row node. | |
| isColumnExportable | Whether a Column is included in System Reports and available in UI for selection | true |
| processExport | Provides custom handling of the Export process before the default export is executed. | |
| reportFilename | Provide a bespoke file name for the Report | |
| skipColumnHeaders | Whether to exclude Column Headers from the exported data | false |
| systemExportDestinations | Export destinations to use; leave unset for all, empty array for none | 'Download', 'Clipboard' |
| systemReportFormats | System Report Formats to use; leave unset for all, empty array for none | 'Excel', 'VisualExcel', 'CSV', 'JSON' |
| systemReportNames | System 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:
| Method | Description |
|---|---|
| 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).
| Property | Description |
|---|---|
| pageName | For OpenFin this is the workbook name; for iPushpull the page name |
| report | The underlying Report |
| reportDestination | Where the live data is being sent |