Excel Export Options
18 Nov 20181 minute to read
The excel export provides an option to customize mapping of the tree grid to excel document.
Export hidden columns
The excel export provides an option to export hidden columns of treegrid by defining includeHiddenColumn in ExcelExportProperties as true.
Show or hide columns on exported excel
You can show a hidden column or hide a visible column while printing the treegrid using ToolbarClick and ExcelExportComplete events.
In the ToolbarClick event, based on args.item.text as Excel Export. We can show or hide columns by setting Visible property to true or false respectively.
In ExcelExportComplete event, We have reversed the state back to the previous state.
In the below example, we have Duration as a hidden column in the treegrid. While exporting, we have changed Duration to visible column and StartDate as hidden column.
File name for exported document
You can assign the file name for the exported document by defining fileName property in ExcelExportProperties.
NOTE
You can refer to our
ASP.NET MVC Tree Gridfeature tour page for its groundbreaking feature representations. You can also explore ourASP.NET MVC Tree Grid exampleto knows how to present and manipulate data.