Aspose::Cells::CommentCollection::Add method

CommentCollection::Add(int32_t, int32_t) method

Adds a comment to the collection.

int32_t Aspose::Cells::CommentCollection::Add(int32_t row, int32_t column)
ParameterTypeDescription
rowint32_tCell row index.
columnint32_tCell column index.

ReturnValue

Comment object index.

Examples

int commentIndex1 = comments.Add(0, 0);
Comment comment1 = comments.Get(commentIndex1);
comment1.SetNote(u"First note.");
comment1.GetFont().SetName(u"Times New Roman");

See Also

CommentCollection::Add(const U16String&) method

Adds a comment to the collection.

int32_t Aspose::Cells::CommentCollection::Add(const U16String &cellName)
ParameterTypeDescription
cellNameconst U16String&Cell name.

ReturnValue

Comment object index.

Examples

U16String val = u"B2";
int commentIndex2 = comments.Add(val);
Comment comment2 = comments.Get(commentIndex2);
comment2.SetNote(u"Second note.");
comment2.GetFont().SetName(u"Times New Roman");

See Also

CommentCollection::Add(const char16_t*) method

Adds a comment to the collection.

int32_t Aspose::Cells::CommentCollection::Add(const char16_t *cellName)
ParameterTypeDescription
cellNameconst char16_t*Cell name.

ReturnValue

Comment object index.

Examples

int commentIndex2 = comments.Add(u"B2");
Comment comment2 = comments.Get(commentIndex2);
comment2.SetNote(u"Second note.");
comment2.GetFont().SetName(u"Times New Roman");

See Also