-
Jquery easyui datagrid
js
导出
excel
修改自
extgrid
导出
excel
/**
* allows for
downloading of grid data (store) directly into
excel
* Method: extracts
data of gridPanel store, uses columnModel to
construct XML excel document,
* converts to Base64, then loads
everything into a data URL link.
*
* @author
*
*/
$$.extend($$.s,{
getExcelXml: function(jq, param) {
var worksheet = Worksheet(jq, param);
//alert($$(jq).d
atagrid('getColumnFields'));
var totalWidth = 0;
var cfs =
$$(jq).datagrid('getColumnFields');
for(var i=1; i<; i++) {
totalWidth+=
$$(jq).datagrid('getColumnOption',cfs[i]).width;
}
//var totalWidth = umnModel().getTotalW
idth(includeHidden);
return '
'
xmlns:ss=
xmlns:x=
xmlns:o=
'
'' +
'
'
'
'
'False' +
'' +
'
'
'
ertical=
/>'
+
'
'
'
ss:Weight=
'
ss:Weight=
ss:Lin
eStyle=
ss:Position=
/>'
+
'
ss:Weight=
'
+
+
Animal
'' +
'
'
'
'
'
'
'
'
ss:V
ertical=
'
'
'
'
'
ss:Horizontal=
'
/>' +
'
'
'
/>' +
'
'
'
'
'
'
'
'
'
'
'
'
/>' +
'
'
'
'
'
'
'
'
'
'
''
+
+
'';
},
-
-
-
-
-
-
-
-
-
上一篇:安装配置centos下的GLPI系统
下一篇:优美爱情诗句的英文版