From 8bb4155672a8fa2e32eb21666dd3ff33291157d6 Mon Sep 17 00:00:00 2001 From: liaochong Date: Tue, 20 Sep 2022 16:30:50 +0800 Subject: [PATCH] fix bug & upgrade poi version to 5.2.3 --- pom.xml | 6 +++--- .../github/liaochong/myexcel/core/AbstractExcelFactory.java | 2 +- .../github/liaochong/myexcel/core/HtmlToExcelFactory.java | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 5e040f04..9b144073 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.github.liaochong myexcel - 4.3.0.RC + 4.3.0.RC1 jar myexcel @@ -22,8 +22,8 @@ UTF-8 UTF-8 1.8 - 5.2.2 - 1.15.2 + 5.2.3 + 1.15.3 1.18.22 3.9.0.RELEASE 2.3 diff --git a/src/main/java/com/github/liaochong/myexcel/core/AbstractExcelFactory.java b/src/main/java/com/github/liaochong/myexcel/core/AbstractExcelFactory.java index 312b6ad8..94f64fb1 100644 --- a/src/main/java/com/github/liaochong/myexcel/core/AbstractExcelFactory.java +++ b/src/main/java/com/github/liaochong/myexcel/core/AbstractExcelFactory.java @@ -150,7 +150,7 @@ public abstract class AbstractExcelFactory implements ExcelFactory { /** * 暂存单元格,由后续行认领 */ - private final List stagingTds = new LinkedList<>(); + protected List stagingTds = new LinkedList<>(); private CreationHelper createHelper; diff --git a/src/main/java/com/github/liaochong/myexcel/core/HtmlToExcelFactory.java b/src/main/java/com/github/liaochong/myexcel/core/HtmlToExcelFactory.java index 7c233627..83f55908 100644 --- a/src/main/java/com/github/liaochong/myexcel/core/HtmlToExcelFactory.java +++ b/src/main/java/com/github/liaochong/myexcel/core/HtmlToExcelFactory.java @@ -30,6 +30,7 @@ import java.io.File; import java.io.IOException; import java.nio.file.NoSuchFileException; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Objects; @@ -252,6 +253,7 @@ private void setTdOfTable(Table table, Sheet sheet) { this.createRow(tr, sheet); tr.tdList = null; } + stagingTds = new LinkedList<>(); table.trList = null; this.setColWidth(colMaxWidthMap, sheet, maxColIndex); }