var xlsxParam = { raw: true }; //转换成excel时,使用原始数据
var wb = XLSX.utils.table_to_book(
document.querySelector("#outTable"),
xlsxParam
);
var wbout = XLSX.write(wb, {
bookType: "xlsx",
bookSST: true,
type: "array",
});
try {
FileSaver.saveAs(
new Blob([wbout], { type: "application/octet-stream;charset=utf-8" }),
"职代会管理.xlsx"
);
} catch (e) {
if (typeof console !== "undefined") console.log(e, wbout);
}
return wbout;
网友评论