New to Kendo UI for jQueryStart a free 30-day trial

Excel Export

Updated on Jul 17, 2026

The TreeList provides built-in Excel export for hierarchical data. Add the Excel command to the toolbar to let users download the current TreeList data as an Excel workbook.

For a runnable example, refer to the TreeList Excel export demo.

Enable Excel Export

To enable Excel export:

  1. Include the JSZip library on the page.
  2. Add the excel command to the TreeList toolbar configuration.
  3. Configure the excel options.

Starting with v2023.3.1115, the JSZip library is no longer distributed with the Kendo UI for jQuery scripts. Load it from an official distribution channel such as unpkg.

The following example adds an Export to Excel button to the TreeList toolbar and names the exported workbook.

<script src="https://unpkg.com/jszip/dist/jszip.min.js"></script>

<div id="treelist"></div>

<script>
    $("#treelist").kendoTreeList({
        toolbar: ["excel"],
        columns: [
            { field: "Name", title: "Name" },
            { field: "Position", title: "Position" }
        ],
        dataSource: [
            { id: 1, parentId: null, Name: "Jane Doe", Position: "Chief Executive Officer" },
            { id: 2, parentId: 1, Name: "John Doe", Position: "Chief Technology Officer" }
        ],
        excel: {
            fileName: "Employees.xlsx"
        }
    });
</script>

Export All Pages

By default, the TreeList exports the current page. Set excel.allPages to true to export all pages of data.

javascript
excel: {
    allPages: true,
    fileName: "Employees.xlsx"
}

Export Programmatically

You can call the saveAsExcel method when a user interacts with an external element to export the TreeList data to an Excel file.

javascript
$("#export").on("click", function() {
    var treeList = $("#treelist").data("kendoTreeList");
    treeList.saveAsExcel();
});

The excelExport event fires before the TreeList saves the generated workbook. Use its e.workbook argument to customize the workbook.

See Also