ExportApi
Provides run-time access to the Export Module and Report state
export interfaceMethods
| 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 |
Method Details
canExportToCsv
If this AdapTable instance can to export to CSV; if false, the Export to Csv option will not be visible
canExportToCsv(): boolean;Returns
boolean
canExportToExcel
If this AdapTable instance can to export to Excel; if false, the Export to Excel option will not be visible
canExportToExcel(): boolean;Returns
boolean
clearFormat
Sets the Report Format to null
clearFormat(): void;Returns
void
clearReport
Sets the Report to null
clearReport(): void;Returns
void
exportReport
Exports the Report with the given Name and Format to the given Destination
exportReport(reportName: ReportNameType, format: ReportFormatType, destination?: ExportDestinationType, exportConfig?: ExportConfig): Promise<void>;Parameters
| Parameter | Type | Description |
|---|---|---|
| reportName | ReportNameType | name of the report |
| format | ReportFormatType | format of the report |
| destination | ExportDestinationType | destination to export to |
| exportConfig | ExportConfig | optional export configuration |
Returns
Promise<void>
getAllExportDestinations
Retrieves the available export destinations
getAllExportDestinations(): ExportDestinationType[];Returns
getAllFormats
Retrieves all Report Formats that are available
getAllFormats(): ReportFormatType[];Returns
getAllReports
Retrieves all available Reports - System and User-created Reports
getAllReports(): Report[];Returns
Report[]
getAvailableCustomDestinations
Retrieves available Custom Destinations (configured in Export Options)
getAvailableCustomDestinations(): CustomDestination[];Returns
getAvailableSystemDestinations
Retrieves available System Export Destinations (configured in Export Options)
getAvailableSystemDestinations(): SystemExportDestination[];Returns
getAvailableSystemFormats
Retrieves available System Report Formats (configured in Export Options)
getAvailableSystemFormats(): SystemReportFormat[];Returns
getAvailableSystemReports
Retrieves available System Reports (configured in Export Options)
getAvailableSystemReports(): SystemReportName[];Returns
getCurrentReport
Retrieves currently selected Report in Adaptable State
getCurrentReport(): Report | undefined;Returns
Report | undefined
getCurrentReportFormat
Retrieves name of currently selected Report
getCurrentReportFormat(): ReportFormatType | undefined;Returns
ReportFormatType | undefined
getCurrentReportName
Retrieves name of currently selected Report
getCurrentReportName(): ReportNameType | undefined;Returns
ReportNameType | undefined
getCustomReports
Retrieves all Custom Reports that have been created by the User
getCustomReports(): Report[];Returns
Report[]
getDestinationByName
Retrieves Destination with the given name
getDestinationByName(destinationName: ExportDestinationType): SystemExportDestination | CustomDestination | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| destinationName | ExportDestinationType | destination to retrieve |
Returns
SystemExportDestination|CustomDestination | undefined
getExportDestinationForm
Form Data entered by the User in the UI for a Custom Destination
getExportDestinationForm(destinationName: ExportDestinationType): AdaptableForm<ExportFormContext> | undefined;Parameters
| Parameter | Type |
|---|---|
| destinationName | ExportDestinationType |
Returns
AdaptableForm<ExportFormContext> | undefined
getExportState
Retrieves Export section from Adaptable State
getExportState(): ExportState;Returns
getReportById
Retrieves Report by Id
getReportById(id: Report['Uuid']): Report;Parameters
| Parameter | Type | Description |
|---|---|---|
| id | Report['Uuid'] | report id |
Returns
getReportByName
Retrieves Report with the given name
getReportByName(reportName: ReportNameType): Report | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| reportName | ReportNameType | report to retrieve |
Returns
Report | undefined
getReportData
Gets the data for the Report with the given Name in the given Format
getReportData(reportName: ReportNameType, format: ReportFormatType, config?: {
exportParams?: (defaultExportParams: CustomExportParams) => CustomExportParams;
showProgressIndicator?: boolean;
}): Promise<ExportResultData>;Parameters
| Parameter | Type | Description |
|---|---|---|
| reportName | ReportNameType | name of the report |
| format | ReportFormatType | format of the report |
| config | \{ exportParams?: (defaultExportParams:CustomExportParams) =>CustomExportParams; showProgressIndicator?: boolean; \} | optional configuration |
Returns
Promise<ExportResultData>
getSupportedExportDestinations
Retrieves the Export Destinations that are supported for the given Report Format
getSupportedExportDestinations(reportFormat: ReportFormatType): ExportDestinationType[];Parameters
| Parameter | Type | Description |
|---|---|---|
| reportFormat | ReportFormatType | report format to check |
Returns
isColumnExportable
Returns whether the given column is exportable
isColumnExportable(adaptablColumn: AdaptableColumn): boolean;Parameters
| Parameter | Type |
|---|---|
| adaptablColumn | AdaptableColumn |
Returns
boolean
isExportDestinationSystem
If the given destination is a System one
isExportDestinationSystem(destinationName: ExportDestinationType): boolean;Parameters
| Parameter | Type |
|---|---|
| destinationName | ExportDestinationType |
Returns
boolean
openExportSettingsPanel
Open Settings Panel with Export section selected
openExportSettingsPanel(): void;Returns
void
selectFormat
Selects the Report Format for Export
selectFormat(reportFormat: ReportFormatType | null): void;Parameters
| Parameter | Type |
|---|---|
| reportFormat | ReportFormatType | null |
Returns
void
selectReport
Selects the Report in the Adaptable State
selectReport(reportName: ReportNameType | null): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| reportName | ReportNameType | null | name of Report to select |
Returns
void
updateReport
Updates an existing report
updateReport(report: Report): Report;Parameters
| Parameter | Type | Description |
|---|---|---|
| report | Report | report to edit |
Returns
updateReports
Updates existing reports
updateReports(reports: Report[]): Report[];Parameters
| Parameter | Type |
|---|---|
| reports | Report[] |
Returns
Report[]