Browse Source

有模板读写异常

developing
Jiaju Zhuang 5 years ago
parent
commit
96be4346ca
  1. 2
      src/main/java/com/alibaba/excel/context/WriteContextImpl.java

2
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());

Loading…
Cancel
Save