From 96be4346ca5d4284f561d454926503c89ad8f589 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Tue, 9 Jun 2020 20:11:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=89=E6=A8=A1=E6=9D=BF=E8=AF=BB=E5=86=99?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/alibaba/excel/context/WriteContextImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/alibaba/excel/context/WriteContextImpl.java b/src/main/java/com/alibaba/excel/context/WriteContextImpl.java index 9a07d353..c1f89f02 100644 --- a/src/main/java/com/alibaba/excel/context/WriteContextImpl.java +++ b/src/main/java/com/alibaba/excel/context/WriteContextImpl.java @@ -164,7 +164,7 @@ public class WriteContextImpl implements WriteContext { try { if (writeSheetHolder.getSheetNo() != null) { // When the add default sort order of appearance - if (WriteTypeEnum.ADD.equals(writeType)) { + if (WriteTypeEnum.ADD.equals(writeType) && writeWorkbookHolder.getTempTemplateInputStream() == null) { currentSheet = createSheet(); } else { currentSheet = writeWorkbookHolder.getWorkbook().getSheetAt(writeSheetHolder.getSheetNo());