diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java index f6d00bac0..68e3b29f4 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java @@ -843,7 +843,12 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { if (sheetComments == null) { return Collections.emptyMap(); } - return sheetComments.getCellComments(); + // the cell comments in sheetComments.getCellComments() do not have the client anchors set + Map map = new HashMap<>(); + for(CellAddress address : sheetComments.getCellComments().keySet()) { + map.put(address, getCellComment(address)); + } + return map; } /**