|
|
@ -179,12 +179,9 @@ public class WriteContextImpl implements WriteContext { |
|
|
|
writeSheetHolder |
|
|
|
writeSheetHolder |
|
|
|
.setCachedSheet(writeWorkbookHolder.getCachedWorkbook().getSheet(writeSheetHolder.getSheetName())); |
|
|
|
.setCachedSheet(writeWorkbookHolder.getCachedWorkbook().getSheet(writeSheetHolder.getSheetName())); |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (IllegalArgumentException e) { |
|
|
|
} catch (Exception e) { |
|
|
|
if (e.getMessage() != null && e.getMessage().contains(NO_SHEETS)) { |
|
|
|
LOGGER.error("initSheet exception ",e); |
|
|
|
currentSheet = createSheet(); |
|
|
|
currentSheet = createSheet(); |
|
|
|
} else { |
|
|
|
|
|
|
|
throw e; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (currentSheet == null) { |
|
|
|
if (currentSheet == null) { |
|
|
|
currentSheet = createSheet(); |
|
|
|
currentSheet = createSheet(); |
|
|
|