The TreeList provides options for exporting its data to Excel.
To enable the Excel export, import the ExcelModule and add the
kendo-treelist-excel component to the Kendo UI TreeList for Angular. To initiate the export, use the
kendoTreeListExcelCommand directive or the
With regard to its Excel export, the TreeList enables you to:
- Export specific data
- All pages
- Expanded state
- Customize the exported columns
- Customize the exported workbooks
- Trigger the export externally
- Make item levels collapsible
By default, the TreeList exports its current data. To export data that is different from the current TreeList data, specify a custom
fetchData function. The function should return an
If the export data needs to be asynchronously loaded, you can set an
Observable to the
By default, the TreeList exports all pages of the current data. To export only the current page set the the
allPages option to
By default, the TreeList expands all items during export. To export the data with the currently expanded items, set
By default, the TreeList exports its current columns. To export columns that are different from the current TreeList columns, include the
<kendo-excelexport-column-group> components inside the
excelExport event allows you to customize the generated Excel document. The workbook event argument exposes the generated Excel workbook configuration.
The TreeList enables you to trigger the export operation by calling the
The option is only applicable if the TreeList has footers.
- During the export to Excel, the cell templates of the TreeList are not evaluated. Instead, the TreeList exports only the data and the field value is serialized to preserve the type information. To tweak the cell content, use an accessor or transform the data in advance.
- During the export to Excel, the TreeList does not use column formats. Column formats are incompatible with Excel. For more information, refer to the page on the Excel-supported formats.
- The maximum size of the exported file to Excel has a system-specific limit. For large data sets, it is highly recommended that you use a server-side solution.
- When you export the TreeList to Excel in older browsers, such as Internet Explorer 9 and Safari, you have to implement a server proxy. For more information, refer to the