diff --git a/src/main/java/com/github/pjfanning/xlsx/impl/StreamingWorkbookReader.java b/src/main/java/com/github/pjfanning/xlsx/impl/StreamingWorkbookReader.java index d305a2c3..2c7a9ce9 100644 --- a/src/main/java/com/github/pjfanning/xlsx/impl/StreamingWorkbookReader.java +++ b/src/main/java/com/github/pjfanning/xlsx/impl/StreamingWorkbookReader.java @@ -269,7 +269,6 @@ public StreamingSheet getSheet(final String name) throws MissingSheetException, private StreamingSheet createSheet(final int idx) throws MissingSheetException { final OoxmlReader.SheetData sheetData = ooxmlReader.getSheetDataAt(idx); - final Map sheetComments = new HashMap<>(); if (builder.readShapes()) { shapeMap.put(sheetData.getSheetName(), sheetData.getShapes()); } @@ -277,13 +276,10 @@ private StreamingSheet createSheet(final int idx) throws MissingSheetException { if (part == null) { throw new MissingSheetException("Sheet at index " + idx + " is missing"); } - if (builder.readComments()) { - sheetComments.put(part, sheetData.getComments()); - } return new StreamingSheet( sheetProperties.get(idx).get("name"), new StreamingSheetReader(this, part, sst, styles, - sheetComments.get(part), use1904Dates, builder.getRowCacheSize())); + sheetData.getComments(), use1904Dates, builder.getRowCacheSize())); } private void lookupSheetNames(Document workbookDoc) {