Ajax调用NPOI导出Excel报表

$("#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 为返回生成在服务器的文件路径
                    }
                });
            })

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。