Reputation: 35
I am trying to export kendo grid using the following code:
<body>
<button id="export">Export to Excel</button>
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
columns: [
{ field: "name" },
{ field: "age" }
],
dataSource: [
{ name: "Jane Doe", age: 30 },
{ name: "John Doe", age: 33 }
],
});
$("#export").click(function(e) {
var grid = $("#grid").data("kendoGrid");
grid.saveAsExcel();
});
</script>
</body>
But this method is not working. I'm using kendo 2017 version. I have also include the jszip script, but still it doesn't work.
Upvotes: 0
Views: 2339
Reputation: 742
I think It's because of your jszip
version for Kendo UI 2017
.
Check your jszip
version.
As of the Kendo UI R3 2017 release, the Excel Export feature supports JSZip 2.* and 3.* versions. Kendo UI releases prior to R2 2017 SP1 provided Excel export of JSZip 2.* versions only.
Check the reference here : Excel Export Requirements
Upvotes: 1