Kendo UI Grid导出到Excel无效

Kendo UI Grid export to Excel not working

我遇到类似的问题,为什么我的excel导出按钮不起作用?
怎么了 感谢帮助。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$("#grid").kendoGrid({
  toolbar: ["create","excel","pdf"],
  excel: {
    \t\tfileName:"Test.xlsx",
        allPages: true
    },
  columns: [
    { field:"name" },
    { field:"age" }
  ],
  dataSource: {
    data: [
      { id: 1, name:"Jane Doe", age: 30 },
      { id: 2, name:"John Doe", age: 33},
    ],
    schema: {
      model: { id:"id" }
    }
  },
  editable: true
});
1
2
3
4
5
6
7
8
9
10
.k-grid-toolbar {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}

.k-grid-toolbar .k-grid-excel {
    margin-left: auto;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    Kendo UI Snippet

    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2019.1.220/styles/kendo.common.min.css"/>
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2019.1.220/styles/kendo.rtl.min.css"/>
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2019.1.220/styles/kendo.silver.min.css"/>
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2019.1.220/styles/kendo.mobile.all.min.css"/>

    <script src="https://code.jquery.com/jquery-1.12.4.min.js">
    <script src="https://kendo.cdn.telerik.com/2019.1.220/js/kendo.all.min.js">
 

</head>
<body>
 


</body>
</html>


如果您已经检查了浏览器的控制台,就会发现Kendo缺少了一些库。"要充分利用Excel导出功能,请下载JSZip库,并将文件包含在Kendo UI JavaScript文件之前,如图所示":https://docs.telerik.com/kendo-ui/framework/excel/introduction #要求