use of org.apache.poi.ss.util.CellAddress in project poi by apache.
the class XSSFSheet method getCellComment.
/**
* Return cell comment at row, column, if one exists. Otherwise returns null.
*
* @param address the location of the cell comment
* @return the cell comment, if one exists. Otherwise return null.
*/
@Override
public XSSFComment getCellComment(CellAddress address) {
if (sheetComments == null) {
return null;
}
final int row = address.getRow();
final int column = address.getColumn();
CellAddress ref = new CellAddress(row, column);
CTComment ctComment = sheetComments.getCTComment(ref);
if (ctComment == null) {
return null;
}
XSSFVMLDrawing vml = getVMLDrawing(false);
return new XSSFComment(sheetComments, ctComment, vml == null ? null : vml.findCommentShape(row, column));
}
Aggregations