[Bug] 导出Excel背景色出现黑色
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 486
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 16
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the TableExportPlugin configuration and its formatExcelJSCell export path, using the provided snippet to reproduce the Excel output. Compare exported cell fill styles with the source table and check how numeric cells are typed and formatted. Done means background colors render correctly and numeric cells are exported as numbers with the expected formatting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100