Aspose::Cells::CommentCollection::Add method
Contents
[
Hide
]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)
Parameter | Type | Description |
---|---|---|
row | int32_t | Cell row index. |
column | int32_t | Cell 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
- Class Vector
- Class CommentCollection
- Namespace Aspose::Cells
- Library Aspose.Cells for C++
CommentCollection::Add(const U16String&) method
Adds a comment to the collection.
int32_t Aspose::Cells::CommentCollection::Add(const U16String &cellName)
Parameter | Type | Description |
---|---|---|
cellName | const 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
- Class Vector
- Class U16String
- Class CommentCollection
- Namespace Aspose::Cells
- Library Aspose.Cells for C++
CommentCollection::Add(const char16_t*) method
Adds a comment to the collection.
int32_t Aspose::Cells::CommentCollection::Add(const char16_t *cellName)
Parameter | Type | Description |
---|---|---|
cellName | const 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
- Class Vector
- Class CommentCollection
- Namespace Aspose::Cells
- Library Aspose.Cells for C++