ExcelExportComponent
Represents the Kendo UI Excel Export component for Angular. Use this component to export data to Excel format.
Definition
Package:@progress/kendo-angular-excel-export
Selector:kendo-excelexport
Export Name:Accessible in templates as #kendoExcelExportInstance="kendoExcelExport"
Syntax:
<kendo-excelexport [data]="gridData" fileName="MyExport.xlsx">
<kendo-excelexport-column field="ProductID" title="Product ID"></kendo-excelexport-column>
<kendo-excelexport-column field="ProductName" title="Product Name"></kendo-excelexport-column>
</kendo-excelexport>
Inputs
collapsible
boolean
Determines whether groups in the Excel file are collapsible.
creator?
string
Specifies the author of the workbook.
data
any[]
Specifies the data to export.
When the data is grouped, structure it as described by the
GroupResult option of the Kendo UI Data Query component.
date?
Date
Specifies the creation date of the workbook.
The default value is new Date().
new Date()
fileName
string
Specifies the name of the exported Excel file.
'Export.xlsx'
filterable
boolean
Determines whether to enable column filtering in the exported Excel file (see example).
forceProxy
boolean
Determines whether to force the use of a proxy server for file downloads.
When set to true, the component sends content to proxyURL even if the browser supports local file saving.
group
any[]
Specifies the exported data groups.
The groups must match the
GroupDescriptor option of the Kendo UI Data Query component.
Specifies the options for cells inserted before header cells to align headers and column values when the data is grouped (see example).
Specifies the options for cells inserted before data, group, and footer cells to show group hierarchy when the data is grouped (see example).
proxyURL
string
Specifies the URL of the server-side proxy that streams the file to the user. When the browser cannot save files locally (for example, Internet Explorer 9 and earlier, and Safari), the component uses a proxy. You must implement the server-side proxy.
The proxy receives a POST request with these parameters in the request body:
contentType—TheMIMEtype of the file.base64—Thebase-64encoded file content.fileName—The requested file name.
The proxy must return the decoded file with the Content-Disposition header set to attachment; filename="<fileName.xslx>".
Methods
Exports the data to Excel.
Optional. The data to export or WorkbookOptions.
Returns a promise that resolves with the file data URI. Use this method to get the Excel file as a data URI.
Optional. The data or WorkbookOptions to use for generating the data URI.
Promise<string>
A promise that resolves with the file data URI.
Returns WorkbookOptions based on the specified columns and data.
Use this method to customize the workbook options.
Optional. The data to export.
Returns:The workbook options.