The widget instance which fired the event.
The array of data items used to create the Excel workbook.
The Excel workbook configuration object . Used to initialize a kendo.ooxml.Workbook class. Modifications of the workbook will reflect in the output Excel document.
If invoked the grid will not save the generated file.
Edit in Kendo UI Dojo Edit
< div id = " grid" > </ div>
< script>
$ ( "#grid" ) . kendoGrid ( {
toolbar : [ "excel" ] ,
columns : [
{ field : "name" }
] ,
dataSource : [
{ name : "Jane Doe" } ,
{ name : "John Doe" }
] ,
excelExport : function ( e ) {
e. workbook . fileName = "Grid.xslx" ;
}
} ) ;
var grid = $ ( "#grid" ) . data ( "kendoGrid" ) ;
grid. saveAsExcel ( ) ;
</ script>
< div id = " pivotgrid" > </ div>
< script>
$ ( "#pivotgrid" ) . kendoPivotGrid ( {
excelExport : function ( e ) {
e. workbook . fileName = "Grid.xslx" ;
} ,
height : 550 ,
dataSource : {
type : "xmla" ,
columns : [ { name : "[Date].[Calendar]" , expand : true } , { name : "[Geography].[City]" } ] ,
rows : [ { name : "[Product].[Product]" } ] ,
measures : [ "[Measures].[Internet Sales Amount]" ] ,
transport : {
connection : {
catalog : "Adventure Works DW 2008R2" ,
cube : "Adventure Works"
} ,
read : {
url : "https://demos.telerik.com/service/v2/olap/msmdpump.dll" ,
dataType : "text" ,
contentType : "text/xml" ,
type : "POST"
}
} ,
schema : {
type : "xmla"
}
}
} ) ;
var pivotgrid = $ ( "#pivotgrid" ) . data ( "kendoPivotGrid" ) ;
pivotgrid. saveAsExcel ( ) ;
</ script>
Edit in Kendo UI Dojo Edit
< div id = " pivotgrid" > </ div>
< script>
$ ( "#pivotgrid" ) . kendoPivotGrid ( {
height : 550 ,
dataSource : {
type : "xmla" ,
columns : [ { name : "[Date].[Calendar]" , expand : true } , { name : "[Geography].[City]" } ] ,
rows : [ { name : "[Product].[Product]" } ] ,
measures : [ "[Measures].[Internet Sales Amount]" ] ,
transport : {
connection : {
catalog : "Adventure Works DW 2008R2" ,
cube : "Adventure Works"
} ,
read : {
url : "https://demos.telerik.com/service/v2/olap/msmdpump.dll" ,
dataType : "text" ,
contentType : "text/xml" ,
type : "POST"
}
} ,
schema : {
type : "xmla"
}
}
} ) ;
var pivotgrid = $ ( "#pivotgrid" ) . data ( "kendoPivotGrid" ) ;
pivotgrid. bind ( "excelExport" , function ( e ) {
e. workbook . fileName = "Grid.xslx" ;
} ) ;
pivotgrid. saveAsExcel ( ) ;
</ script>