Beispiel #1
0
        public ActionResult Export()
        {
            DataTable table = new DataTable();

            table.Columns.Add("登录ID", typeof(string));
            table.Columns.Add("姓名", typeof(string));
            table.Columns.Add("密码", typeof(string));

            DataRow row = table.NewRow();

            row["登录ID"] = "登陆1";
            row["姓名"]   = "姓名1";
            row["密码"]   = "123";

            table.Rows.Add(row);

            ExportExcelHelper.ExportFromDataTable("员工信息.xls", table);
            return(resultMsg("导出成功!"));
        }