参考资料:
table2Excel:https://github.com/JackGit/table2excel.js
exceljs :https://github.com/guyonroche/exceljs#interface
function exportTables() {
// 获取sheetName 数组
var sname = [];
$(".checkListTable").each(function() {
sname.push($(this).attr('title'));
})
// 导出表格core func
var table2Excel = new Table2Excel('.checkListTable', {
workbook: {
created: dateFtt("yyyy-MM-dd hh:mm:ss", new Date()),
},
plugins: [
Table2Excel.plugins.alignmentPlugin,
Table2Excel.plugins.hyperlinkPlugin,
{
workcellCreated({
workbook,
tables,
worksheet,
table,
workcell,
cell,
cellStyle,
rowRange,
colRange
}) {