首页 > Web开发 > 详细

Ajax调用NPOI导出Excel报表

时间:2015-03-13 20:31:59      阅读:514      评论:0      收藏:0      [点我收藏+]

$("#btnExcel").click(function () {
                $.ajax({
                    url: "../ashx/Report.ashx",
                    type: "post",
                    dataType: "text",
                    data: { RequestType: "ReviewReportExportExcel",
                        Site: $("#ddlSite").val(),
                        PerformanceType: $("#ddlPerformanceType").val(),
                        Period: getPeriod(),
                        OrgIDs: $("#hidDept").val(),
                        UserSapIDs: $("#hidUser").val(),
                        ProcType: $("#ddlProcType").val(),
                        Status: $("#ddlFormStatus").val(),
                        IsContainsLeavedStaff: $("#chkContainsLeavedStaff").is(‘:checked‘) ? "1" : "0",
                        LeavedBeginDate: $("#txtLeavedBeginDate").val(),
                        LeavedEndDate: $("#txtLeavedEndDate").val(),
                        CurtureID: curtureID,
                        IsPage: "0",
                        PageSize: pageSize,
                        PageIndex: "1"
                    },
                    success: function (data) {
                        window.location.replace("../" + data);  //data 为返回生成在服务器的文件路径
                    }
                });
            })

Ajax调用NPOI导出Excel报表

原文:http://www.cnblogs.com/SuperLiangG/p/4335748.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!