Excel Export in JavaScript TreeGrid
The excel export allows exporting TreeGrid data to Excel document. You need to use the excelExport method for exporting. To enable Excel export in the treegrid, set the allowExcelExport as true.
To use excel export, You need to inject the ExcelExport module in treegrid.
Persist collapsed state
You can persist the collapsed state in the exported document by defining isCollapsedStatePersist property as true in TreeGridExcelExportProperties parameter of excelExport method.
Custom data source
The excel export provides an option to define datasource dynamically before exporting. To export data dynamically, define the dataSource in exportProperties.
Exporting custom aggregates in TreeGrid
The TreeGrid enables exporting custom aggregates, which summarize column data, to an Excel document using the excelAggregateQueryCellInfo event.
In the provided example, the customAggregateFn function computes the item count for a selected category, while the excelAggregateQueryCellInfo event customizes the exported cell values in the Excel document.
You can refer to our
JavaScript Tree Gridfeature tour page for its groundbreaking feature representations. You can also explore our JavaScript Tree Grid exampleJavaScript Tree Grid exampleto knows how to present and manipulate data.