jquery easyui datagrid 怎么导出excel
1个回答
展开全部
datagrid的扩展方法,用于将当前的数据生成excel需要的内容。
复制代码
1 <script>
2 /**
3 Jquery easyui datagrid js导出excel
4 修改自extgrid导出excel
5 * allows for downloading of grid data (store) directly into excel
6 * Method: extracts data of gridPanel store, uses columnModel to construct XML excel document,
7 * converts to Base64, then loads everything into a data URL link.
8 *
9 * @author Animal <extjs support team>
10 *
11 */
12 $.extend($.fn.datagrid.methods, {
13 getExcelXml: function (jq, param) {
14 var worksheet = this.createWorksheet(jq, param);
15 //alert($(jq).datagrid('getColumnFields'));
16 var totalWidth = 0;
17 var cfs = $(jq).datagrid('getColumnFields');
18 for (var i = 1; i <
复制代码
1 <script>
2 /**
3 Jquery easyui datagrid js导出excel
4 修改自extgrid导出excel
5 * allows for downloading of grid data (store) directly into excel
6 * Method: extracts data of gridPanel store, uses columnModel to construct XML excel document,
7 * converts to Base64, then loads everything into a data URL link.
8 *
9 * @author Animal <extjs support team>
10 *
11 */
12 $.extend($.fn.datagrid.methods, {
13 getExcelXml: function (jq, param) {
14 var worksheet = this.createWorksheet(jq, param);
15 //alert($(jq).datagrid('getColumnFields'));
16 var totalWidth = 0;
17 var cfs = $(jq).datagrid('getColumnFields');
18 for (var i = 1; i <
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询