VTable
VTable copied to clipboard
[Bug] 导出Excel背景色出现黑色
Version
1.20.2
Link to Minimal Reproduction
无
Steps to Reproduce
import {TableExportPlugin} from '@visactor/vtable-plugins';
const tableExportPlugin = new TableExportPlugin({
exportExcelOptions: {
exportAllData: true,
downloadFile: false,
// fileName: `${name}-${dt}`
formatExcelJSCell: (cellInfo, cellInExceljs) => {
if (cellInfo.col === 1) {
}
// delete cellInExceljs.style.fill;
return cellInExceljs;
}
},
});
Current Behavior
原表格样式
导出Excel的样子
Debug看了下黑色背景的单元格没有差异
Expected Behavior
正确显示背景色 另外,数字单元格现在都是以文本形式展示,建议设置为数值之后使用exceljscell的numFmt格式化
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response
此外,能否在formatExcelJSCell参数中获取cellInfo属于透视表的哪个部位,如:行表头、列表头、行汇总表头、列汇总表头、小计表头等等
指标表头出不来,找到原因是indent缩进的问题
没有设置缩进,不知道为什么indent会出现5缩进
此外,能否在formatExcelJSCell参数中获取cellInfo属于透视表的哪个部位,如:行表头、列表头、行汇总表头、列汇总表头、小计表头等等
let {row, col} = cellInfo
table.getCellHeaderPaths(col, row)