Procházet zdrojové kódy

如果是第一个记录,默认重新开始进行分组

4.1.3.A
Twenty před 6 roky
rodič
revize
b1b3cb92a0
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. +1
    -1
      easypoi-base/src/main/java/cn/afterturn/easypoi/excel/export/ExcelExportService.java

+ 1
- 1
easypoi-base/src/main/java/cn/afterturn/easypoi/excel/export/ExcelExportService.java Zobrazit soubor

@@ -82,7 +82,7 @@ public class ExcelExportService extends BaseExportService {
for (int i = 0, exportFieldTitleSize = excelParams.size(); i < exportFieldTitleSize; i++) {
ExcelExportEntity entity = excelParams.get(i);
// 加入换了groupName或者结束就,就把之前的那个换行
if (StringUtils.isBlank(entity.getGroupName()) || !entity.getGroupName().equals(excelParams.get(i - 1).getGroupName())) {
if (StringUtils.isBlank(entity.getGroupName()) || i = 0 || !entity.getGroupName().equals(excelParams.get(i - 1).getGroupName())) {
if (groupCellLength > 1) {
sheet.addMergedRegion(new CellRangeAddress(index, index, cellIndex - groupCellLength, cellIndex - 1));
}


Načítá se…
Zrušit
Uložit