From 9ac8ccf2b0719b912c14b92ae06382b5b64a88f5 Mon Sep 17 00:00:00 2001 From: abel Date: Tue, 26 Apr 2022 09:29:42 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-70032=20&=20REPORT-70020=20poi=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v2/org/apache/poi/xssf/streaming/SXSSFWorkbook.java | 2 +- .../v2/org/apache/poi/xssf/streaming/SheetDataWriter.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fine-poi/src/main/java/com/fr/third/v2/org/apache/poi/xssf/streaming/SXSSFWorkbook.java b/fine-poi/src/main/java/com/fr/third/v2/org/apache/poi/xssf/streaming/SXSSFWorkbook.java index 456332b2f..b27a79453 100644 --- a/fine-poi/src/main/java/com/fr/third/v2/org/apache/poi/xssf/streaming/SXSSFWorkbook.java +++ b/fine-poi/src/main/java/com/fr/third/v2/org/apache/poi/xssf/streaming/SXSSFWorkbook.java @@ -208,7 +208,7 @@ public class SXSSFWorkbook implements Workbook { * @param compressTmpFiles whether to use gzip compression for temporary files */ public SXSSFWorkbook(XSSFWorkbook workbook, int rowAccessWindowSize, boolean compressTmpFiles){ - this(workbook,rowAccessWindowSize, compressTmpFiles, false); + this(workbook,rowAccessWindowSize, compressTmpFiles, true); } /** diff --git a/fine-poi/src/main/java/com/fr/third/v2/org/apache/poi/xssf/streaming/SheetDataWriter.java b/fine-poi/src/main/java/com/fr/third/v2/org/apache/poi/xssf/streaming/SheetDataWriter.java index 2dbf189ac..93980a525 100644 --- a/fine-poi/src/main/java/com/fr/third/v2/org/apache/poi/xssf/streaming/SheetDataWriter.java +++ b/fine-poi/src/main/java/com/fr/third/v2/org/apache/poi/xssf/streaming/SheetDataWriter.java @@ -36,6 +36,7 @@ import com.fr.third.v2.org.apache.poi.ss.usermodel.Cell; import com.fr.third.v2.org.apache.poi.ss.usermodel.CellStyle; import com.fr.third.v2.org.apache.poi.ss.usermodel.CellType; import com.fr.third.v2.org.apache.poi.ss.usermodel.FormulaError; +import com.fr.third.v2.org.apache.poi.ss.usermodel.RichTextString; import com.fr.third.v2.org.apache.poi.ss.util.CellReference; import com.fr.third.v2.org.apache.poi.util.POILogFactory; import com.fr.third.v2.org.apache.poi.util.POILogger; @@ -315,7 +316,9 @@ public class SheetDataWriter implements Closeable { } case STRING: { if (_sharedStringSource != null) { - XSSFRichTextString rt = new XSSFRichTextString(cell.getStringCellValue()); + //XSSFRichTextString rt = new XSSFRichTextString(cell.getStringCellValue()); + RichTextString rt = cell.getRichStringCellValue(); + int sRef = _sharedStringSource.addSharedStringItem(rt); int sRef = _sharedStringSource.addSharedStringItem(rt); writeAttribute("t", STCellType.S.toString());