zoukankan      html  css  js  c++  java
  • 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 为返回生成在服务器的文件路径
                        }
                    });
                })

  • 相关阅读:
    win10安装mongodb教程及其失败解决方案
    基于TypeScript的NodeJs框架:NestJs开发博客API (node.js+nest.js)
    Webpack性能改造之CDN
    44道JavaScript送命题
    electron-vue学习手册
    万字长文带你深度解锁Webpack(进阶篇)
    4W字长文带你深度解锁Webpack系列(上)
    devexpress GalleryControl 获得选中的item并删除
    c# 任意角度旋转图片
    .net core3.1连接GBase数据库的步骤
  • 原文地址:https://www.cnblogs.com/SuperLiangG/p/4335748.html
Copyright © 2011-2022 走看看