Aspose::Cells::CommentCollection class

CommentCollection class

Encapsulates a collection of Comment objects.

class CommentCollection

Methods

MethodDescription
Add(int32_t row, int32_t column)Adds a comment to the collection.
Add(const U16String& cellName)Adds a comment to the collection.
Add(const char16_t* cellName)Adds a comment to the collection.
AddThreadedComment(int32_t row, int32_t column, const U16String& text, const ThreadedCommentAuthor& author)Adds a threaded comment.
AddThreadedComment(int32_t row, int32_t column, const char16_t* text, const ThreadedCommentAuthor& author)Adds a threaded comment.
AddThreadedComment(const U16String& cellName, const U16String& text, const ThreadedCommentAuthor& author)Adds a threaded comment.
AddThreadedComment(const char16_t* cellName, const char16_t* text, const ThreadedCommentAuthor& author)Adds a threaded comment.
Clear()Removes all comments;.
CommentCollection(CommentCollection_Impl* impl)Constructs from an implementation object.
CommentCollection(const CommentCollection& src)Copy constructor.
Get(int32_t index)Gets the Comment element at the specified index.
Get(const U16String& cellName)Gets the Comment element at the specified cell.
Get(const char16_t* cellName)Gets the Comment element at the specified cell.
Get(int32_t row, int32_t column)Gets the Comment element at the specified row index and column index.
GetCount()
GetThreadedComments(int32_t row, int32_t column)Gets the threaded comments by row and column index.
GetThreadedComments(const U16String& cellName)Gets the threaded comments by cell name.
GetThreadedComments(const char16_t* cellName)Gets the threaded comments by cell name.
IsNull() constChecks whether the implementation object is nullptr.
explicit operator bool() constoperator bool()
operator=(const CommentCollection& src)operator=
RemoveAt(const U16String& cellName)Removes the comment of the specific cell.
RemoveAt(const char16_t* cellName)Removes the comment of the specific cell.
RemoveAt(int32_t row, int32_t column)Removes the comment of the specific cell.
~CommentCollection()Destructor.

Fields

FieldDescription
_implThe implementation object.

Examples

Aspose::Cells::Startup();
Workbook workbook;

CommentCollection comments = workbook.GetWorksheets().Get(0).GetComments();
Aspose::Cells::Cleanup();

See Also