Interface Comments

All Known Implementing Classes:
CommentsTable

public interface Comments
An interface exposing useful functions for dealing with Excel Workbook Comments. It is intended that this interface should support low level access and not expose all the comments in memory
  • Method Details

    • setSheet

      @Internal void setSheet(Sheet sheet)
      This method is for internal POI use only. POI uses it to link the sheet and comments table. This method will not move comments from one sheet to another (if a user tries to use this method for that purpose).
      Parameters:
      sheet - the sheet that this comments table is associated with
      Since:
      POI 5.2.0
    • getNumberOfComments

      int getNumberOfComments()
    • getNumberOfAuthors

      int getNumberOfAuthors()
    • getAuthor

      String getAuthor(long authorId)
    • findAuthor

      int findAuthor(String author)
    • findCellComment

      XSSFComment findCellComment(CellAddress cellAddress)
      Finds the cell comment at cellAddress, if one exists
      Parameters:
      cellAddress - the address of the cell to find a comment
      Returns:
      cell comment if one exists, otherwise returns null
    • removeComment

      boolean removeComment(CellAddress cellRef)
      Remove the comment at cellRef location, if one exists
      Parameters:
      cellRef - the location of the comment to remove
      Returns:
      returns true if a comment was removed
    • getCellAddresses

      Iterator<CellAddress> getCellAddresses()
      Returns all cell addresses that have comments.
      Returns:
      An iterator to traverse all cell addresses that have comments.
      Since:
      4.0.0
    • createNewComment

      XSSFComment createNewComment(ClientAnchor clientAnchor)
      Create a new comment and add to the CommentTable.
      Parameters:
      clientAnchor - the anchor for this comment
      Returns:
      new XSSFComment
      Since:
      POI 5.2.0
    • referenceUpdated

      void referenceUpdated(CellAddress oldReference, XSSFComment comment)
      Called after the reference is updated, so that we can reflect that in our cache
      Parameters:
      oldReference - the comment to remove from the commentRefs map
      comment - the comment to replace in the commentRefs map
      Since:
      POI 5.2.0
      See Also:
    • commentUpdated

      void commentUpdated(XSSFComment comment)
      Called after the comment is updated, so that we can reflect that in our cache
      Parameters:
      comment - the comment to replace in the commentRefs map
      Since:
      POI 5.2.0
      See Also: