//调用导出Excel方法
tableToExcel(document.getElementById("flag_toExcel"), "Report" + currentTime, "Report" + currentTime + ".xls");
//导出excel
var tableToExcel = (function () {
var uri = 'data:application/vnd.ms-excel;base64,',
template = '<meta http-equiv=\"content-type\" content=\"application/vnd.ms-excel; charset=utf-8\"/><html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWork
前端导出Excel文件(Table导出到Excel)
最新推荐文章于 2024-05-16 18:15:52 发布