mirror of https://github.com/apache/poi.git
[bug-66257] add explicit POIXMLException when sheet package cannot be found
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903972 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
229ad7d184
commit
04df5191fc
|
@ -349,6 +349,9 @@ public class XSSFReader {
|
|||
String sheetId = xssfSheetRef.getId();
|
||||
try {
|
||||
PackagePart sheetPkg = sheetMap.get(sheetId);
|
||||
if (sheetPkg == null) {
|
||||
throw new POIXMLException("Failed to find sheet package for sheetId=" + sheetId);
|
||||
}
|
||||
return sheetPkg.getInputStream();
|
||||
} catch (IOException e) {
|
||||
throw new POIXMLException(e);
|
||||
|
|
Loading…
Reference in New Issue