赞
踩
从后台获取数据,并导出EXCEL文件
Jsp页面:
<a href="javascript:;" id="exportExcel" class="easyui-linkbutton" data-options="iconCls:'icon-export-excel',size:'normal'" plain="true">
<span class="button-text">excel数据导出</span></a>
//导出excel
$("#exportExcel").click(function(){
//房帖历史记录excel
$.ajax({
"url":"<%=basePath%>/ftbdlsExcel.action",
"type":"post",
datatype:"json",
data:{
scgzksj: $("#SCGZKSJ").val(),
rybh: $("#STAFF_ID").val(),
dw:dwid,
xm: $("#NAME").val()
},
success:function(filedownloadpath){
StandardPost('<%=basePath%>/fileDownload',{'path':filedownloadpath};
top.$.messager.alert("系统提示","导出成功!","info");
}
});
});
Struts.Xml
<!--房帖历史记录 导出excel -->
<action name="ftbdlsExcel" class="salaryManagementAction" method="ftbdlsExcel">
<result type="json">
<param name="root">filedownloadpath</param>
</result>
&
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。