Excel Export

The KendoReact TreeList provides options for exporting its data to Excel in hierarchical tree format.

Getting Started

To enable the Excel export:

  1. Install kendo-react-excel-export package.

    npm install @progress/kendo-react-excel-export @progress/kendo-licensing
  2. Import the ExcelExport component in your React Application.

    import { ExcelExport } from '@progress/kendo-react-excel-export';
  3. Wrap the TreeList inside an ExcelExport component.

  4. Set the hierarchy prop of the ExcelExport to true.

  5. Transform the data to a flat array with a level for each data record, using the treeToFlat function provided by the TreeList package.

  6. Pass the flat array and columns that have to be exported to the save function.

The following example demonstrates the basic implementation of the Excel export functionality of the TreeList.

View Source
Change Theme:


You can entirely control the Excel export configuration through the arguments that are passed to the save function of the KendoReact Excel Export component.

The ExcelExport enables you to:

Exporting Specific Data

To export specific data, pass the data to the save function of the ExcelExport component. For example, if the TreeList has its paging enabled but you need to export only the current page, pass the paged data to the save function.

View Source
Change Theme:

Customizing Exported Workbook

When exporting the excel file we provide an option to customize the generated workbook. This can be used to modify the values, the appearance or the sheets in the document. The following example demonstrates how to add a different background color on the alt rows.

View Source
Change Theme:

Known Limitations

  • 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 use the ExcelExport in older browsers, such as Internet Explorer 9 and Safari, you have to implement a server proxy. For more information, refer to the proxyUrl configuration of the ExcelExport component.