excel.collapsible Boolean (default: false)

Enables or disables collapsible (grouped) rows, for grids with aggregates.

Example - enable collapsible rows in the output Excel file

<div id="grid"></div>
<script>
 $("#grid").kendoGrid({
   toolbar: ["excel"],
   excel: {
     fileName: "excel-collapsible.xlsx",
     proxyURL: "https://demos.telerik.com/kendo-ui/service/export",
     filterable: true,
     collapsible: true
   },
   dataSource: {
     type: "odata",
     transport: {
       read: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Products"
     },
     schema:{
       model: {
         fields: {
           UnitsInStock: { type: "number" },
           ProductName: { type: "string" },
           UnitPrice: { type: "number" },
           UnitsOnOrder: { type: "number" },
           UnitsInStock: { type: "number" }
         }
       }
     },
     pageSize: 50,
     group: {
       field: "UnitsInStock", aggregates: [
         { field: "ProductName", aggregate: "count" },
         { field: "UnitPrice", aggregate: "sum"},
         { field: "UnitsOnOrder", aggregate: "average" },
         { field: "UnitsInStock", aggregate: "count" }
       ]
     },
     aggregate: [
       { field: "ProductName", aggregate: "count" },
       { field: "UnitPrice", aggregate: "sum" },
       { field: "UnitsOnOrder", aggregate: "average" },
       { field: "UnitsInStock", aggregate: "min" },
       { field: "UnitsInStock", aggregate: "max" }
     ]
   },
   sortable: true,
   pageable: true,
   groupable: true,
   filterable: true,
   columnMenu: true,
   reorderable: true,
   resizable: true,
   columns: [
     { field: "ProductName", title: "Product Name", aggregates: ["count"], footerTemplate: "Total Count: #=count#", groupFooterTemplate: "Count: #=count#" },
     { field: "UnitPrice", title: "Unit Price", aggregates: ["sum"] },
     { field: "UnitsOnOrder", title: "Units On Order", aggregates: ["average"], footerTemplate: "Average: #=average#",
       groupFooterTemplate: "Average: #=average#" },
     { field: "UnitsInStock", title: "Units In Stock", aggregates: ["min", "max", "count"], footerTemplate: "Min: #= min # Max: #= max #",
       groupHeaderTemplate: "Units In Stock: #= value # (Count: #= count#)" }
   ]
 });
</script>
In this article
Not finding the help you need? Improve this article