forked from github/dataease
Merge pull request #12673 from dataease/pr@dev-v2@fix_pivot_formated_export_zero
fix(图表): 修复透视表带格式导出数据为 0 时单元格实际为空 #12088
This commit is contained in:
commit
a09c22bfc1
@ -1148,7 +1148,7 @@ export async function exportPivotExcel(instance: PivotSheet, chart: ChartObj) {
|
|||||||
for (let colIndex = 0; colIndex < colLeafNodes.length; colIndex++) {
|
for (let colIndex = 0; colIndex < colLeafNodes.length; colIndex++) {
|
||||||
const dataCellMeta = layoutResult.getCellMeta(rowIndex, colIndex)
|
const dataCellMeta = layoutResult.getCellMeta(rowIndex, colIndex)
|
||||||
const { fieldValue } = dataCellMeta
|
const { fieldValue } = dataCellMeta
|
||||||
if (fieldValue) {
|
if (fieldValue === 0 || fieldValue) {
|
||||||
const meta = metaMap[dataCellMeta.valueField]
|
const meta = metaMap[dataCellMeta.valueField]
|
||||||
const cell = worksheet.getCell(rowIndex + maxColHeight + 1, rowLength + colIndex + 1)
|
const cell = worksheet.getCell(rowIndex + maxColHeight + 1, rowLength + colIndex + 1)
|
||||||
const value = meta?.formatter?.(fieldValue) || fieldValue.toString()
|
const value = meta?.formatter?.(fieldValue) || fieldValue.toString()
|
||||||
|
Loading…
Reference in New Issue
Block a user