This commit is contained in:
xuliangzhan
2020-12-22 22:05:07 +08:00
parent 68b5514589
commit ca244ff401
2 changed files with 2 additions and 9 deletions

View File

@@ -40,7 +40,7 @@ gulp.task('build_umd', function () {
globals: {
[pack.name]: exportModuleName,
'xe-utils': 'XEUtils',
'xlsx': 'XLSX'
'exceljs': 'ExcelJS'
},
exactGlobals: true
}]

View File

@@ -27,13 +27,6 @@ function getFooterData (opts: TableExportConfig, footerData: any[][]) {
return footerFilterMethod ? footerData.filter((items, index) => footerFilterMethod({ items, $rowIndex: index })) : footerData
}
function toBuffer (wbout: any) {
const buf = new ArrayBuffer(wbout.length)
const view = new Uint8Array(buf)
for (let index = 0; index !== wbout.length; ++index) view[index] = wbout.charCodeAt(index) & 0xFF
return buf
}
function getCellLabel (column: ColumnConfig, cellValue: any) {
if (cellValue) {
switch (column.cellType) {
@@ -283,7 +276,7 @@ function exportXLSX (params: InterceptorExportParams) {
})
}
if (useStyle && sheetMethod) {
sheetMethod({ options, workbook, worksheet: sheet })
sheetMethod({ options, workbook, worksheet: sheet, columns, colgroups, datas, $table })
}
sheetMerges.forEach(({ s, e }) => {
sheet.mergeCells(s.r + 1, s.c + 1, e.r + 1, e.c + 1)