fix:【图表】修复明细表表头合并后导出数据样式问题 (#15571)

Co-authored-by: taojinlong <jinlong@fit2cloud.com>
This commit is contained in:
taojinlong
2025-04-01 20:38:43 +08:00
committed by GitHub
parent fe74afdaaf
commit 66adc9d34e

View File

@@ -518,12 +518,11 @@ public class ChartDataServer implements ChartDataApi {
cell.setCellStyle(cellStyle);
cell.setCellValue(getDeFieldName(xAxis, column.getKey()));
} else {
Cell cell1 = rowMap.get("row" + depth).createCell(width);
cell1.setCellValue(getDeFieldName(xAxis, column.getKey()));
cell1.setCellStyle(cellStyle);
Cell cell2 = rowMap.get("row" + toDepth).createCell(width);
cell2.setCellValue(getDeFieldName(xAxis, column.getKey()));
cell2.setCellStyle(cellStyle);
for (int i = depth; i <= toDepth; i++) {
Cell cell1 = rowMap.get("row" + i).createCell(width);
cell1.setCellValue(getDeFieldName(xAxis, column.getKey()));
cell1.setCellStyle(cellStyle);
}
CellRangeAddress region = new CellRangeAddress(depth, toDepth, width, width);
sheet.addMergedRegion(region);