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