exportToExcel(exportRequest)
Exports a table into an Excel file.
Returns
A Promise that resolves to a base64 response (the Excel file).
Parameters
Name | Type | Description | Required |
exportRequest | object | A payload object to configure the export. | ✅ |
The following table contains the properties of the exportRequest object:
Name | Type | Description | Required |
pyName | string | The name of the exported table. | ✅ |
pyMode | string | The type of export to be performed ("excel", etc.) | ✅ |
pyClassName | string | The class of the data to be exported. | ✅ |
pyContent | string | A stringified JSON object containing the table component metadata and state. | ✅ |
Usage example
In this example, the API returns a Promise that resolves to a base64 response (the Excel file).
const exportRequest = {
pyName: "Export",
pyMode: "excel",
pyClassName: "@baseclass",
pyContent: JSON.stringify({ metadata, state })
};
PCore.getAnalyticsUtils().exportToExcel(exportRequest).then(response => { ... }).catch(() => { ... });
Previous topic deleteInsight(insightID) Next topic getDataObjects()