Exporting Data from AdapTable
Summary
- AdapTable makes it easy to Export data from AG Grid to a destination of the user's choice.
- Data is exported from AdapTable in the form of a Report. There are 2 types:
- System Reports - set of Reports shipped by AdapTable to export all, visible or selected data
- Custom Reports - configured by end-users and typically using a Query evaluated by AdapTableQL
- Reports are exported using a Report Format Type: Excel, VisualExcel, CSV or JSON
- Each Report is exported to an Export Destinations, of which there are 2 also types:
- System Destinations - provided by AdapTable: Downloadable File or Clipboard
- Custom Destinations - bespoke destinations provided by developers (e.g. Email, Rest Api etc.)
- Developers are also able to configure many elements of export including:
- how the export data is formatted
- whether to run reports on a schedule
Exporting in AdapTable enables data in AG Grid to be sent (in the form of Reports) to other locations.
Exporting a Report is a straightforward, 3-step process, comprising 3 elements:
- A Report - a defined set of rows and columns (provided by AdapTable or created by users)
- A Report Format Type - one of Excel, VisualExcel, JSON or CSV
- An Export Destination (either provided by AdapTable or by users)
Caution
- Export is not a WYSIWYG operation - AdapTable exports report data and not column styles or row groups etc.
- The one exception to this is the
VisualExcelReport Format Type which does include Column Formatting
Hint
Developers can, however, choose whether exported data contains cell raw values (the default) or display values
- This demo illustrates some of the exporting options in AdapTable (described in greater detail elsewhere in this section). These include:
- a Custom Report called
Popular Frameworksthat uses an Expression to export the required data - a Custom Export Destination of
Rest Endpoint(though here we just output to the console) - set 2 Formatting Reports export-formatting related rules (to export formatted cell values and use the format: 'yyyy-dd-MM' for dates)
- a Custom Report called
Reports
There are 2 types of Reports available in AdapTable:
- System Reports - shipped by AdapTable and used in most common use cases
- Custom Reports - provided by users (in UI or in InitialState) specifying which Columns and Rows to export
Note
- Both types of report can be exported using multiple Report Formats to multiple destinations
- Custom Reports contain a Boolean Expression that will be evaluated by AdapTableQL each time the Report is run
Report Format Types
AdapTable enables Reports to be created in 4 different Report Format Types
-
Excel
-
Visual Excel (includes styling)
-
CSV
-
JSON
Export Destinations
By default exported Reports are available in 2 System Export Destinations which are shipped by AdapTable:
-
as a downloadable File which the user can download and run as required
-
sent to the Clipboard (for
CSVandJSONReport Format Types only)
Note
Depending on whether the appropriate Plugin is loaded, Reports can also be exported to ipushpull or OpenFin Excel
It is also possible to export Reports to Custom Destinations that are supplied by developers at design-time using the customDestinations property in Export Options.
Hint
This enables exporting Grid data to email, PDF, REST Api etc. while still leveraging AdapTable's Export, Expressions, Scheduling and State Management functionality
Customising Reports
AdapTable provides many Export Options to configure the behaviour or appearance of Reports.
These options include (among others):
- configuring which Reports, Report Format Types or Destinations are available to the user in the UI
- setting the name of the downloaded file
- customizing the exported data e.g. to export formatted data or bespoke formats for Date columns
- processing the report - to run it on the server, or to cancel the export
- choosing whether to include Column Headers in the exported data
- configuring which Columns can be fully excluded from Export
Find Out More
See the Configuring Reports, Formatting Report Data and Processing Reports topics for more information
Using Export
Reports are managed at runtime via the Export section of the Settings Panel.
This lists the details of all Reports, and associated Report Format Types, in Adaptable State with options to:
- Run with a dropdown showing all available destinations
- Create (Custom Reports only - via the Export Wizard)
- Edit (Custom Reports only - via the Export Wizard)
- Delete
- Suspend
- Share (if Team Sharing is running)
- Schedule (so they run at a specified time)
Running Reports
Reports can be run from a number of places:
- Export Toolbar in the Dashboard
- Export Tool Panel in the AdapTable ToolPanel Component
- Export Status Bar Panel in the AdapTable Status Bar
- Export Section in the Settings Panel
- Via the Context Menu (
Selected DataReport only) - Programmatically via methods in the Export API section of AdapTable API
FAQ
Is the export 'live' - will it update when the grid data changes? No - export is a one time only snapshot. However AdapTable contains Modules (all available as Plugins) which do offer Live Data e.g. ipushpull and OpenFin
Do you include column names in the exported data? Yes, column names are always included in the Report
Is there an option when just copying to the clipboard to exclude column names?
Yes, using the skipColumnHeaders property in Export Options
Is there a limit on the number of reports that I can create? No, reports like all other Adaptable Objects are unlimited.
Is there a limit on how much data I can export? AdapTable doesn't set a limit as everyone's computer and hardware is different. It also depends which destination you are sending to. As a general rule if sending to Excel we advise not exporting more than 300,000 cells.
Deep Dive
Exporting huge data sets to Excel
Why can I not see the Excel Report Format Type?
Make sure you are have the correct AG Grid Modules set (i.e. ExcelExportModule) for this option to be available.
Can I run a Report even though it will display data not in AdapTable? Yes, you can process the Report each time it runs and leverage that to provide any data you require.
Can I hide some of the shipped Reports or Format Types?
Yes, both are available via systemReportNames and systemReportFormats properties in Export Options respectively
Can I export the display formatted cell value in the column and not the raw value?
Yes by setting the exportDataFormat property in Export Options.