Sfoglia il codice sorgente

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

4.1.3.A
Twenty 6 anni fa
parent
commit
b1b3cb92a0
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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 Vedi File

@@ -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));
}


Caricamento…
Annulla
Salva