Browse Source

有模板读写异常

developing
Jiaju Zhuang 4 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 { try {
if (writeSheetHolder.getSheetNo() != null) { if (writeSheetHolder.getSheetNo() != null) {
// When the add default sort order of appearance // When the add default sort order of appearance
if (WriteTypeEnum.ADD.equals(writeType)) { if (WriteTypeEnum.ADD.equals(writeType) && writeWorkbookHolder.getTempTemplateInputStream() == null) {
currentSheet = createSheet(); currentSheet = createSheet();
} else { } else {
currentSheet = writeWorkbookHolder.getWorkbook().getSheetAt(writeSheetHolder.getSheetNo()); currentSheet = writeWorkbookHolder.getWorkbook().getSheetAt(writeSheetHolder.getSheetNo());

Loading…
Cancel
Save