Get Started
Usage API
More information

ApiComment

new ApiComment()

Class representing the comments.

Properties

Name Type Description
Text string

Returns the text from the first cell in range.

Methods

Name Description
Delete

Delete an ApiComment object.

GetClassType

Returns the type of comment class.

GetText

Return the comment text.

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("A1").SetValue("1");
oRange = oWorksheet.GetRange("A1");
oRange.AddComment("This is just a number.");
oComment = oRange.GetComment();
oWorksheet.GetRange("A3").SetValue("Comment: " + oComment.GetText());
builder.SaveFile("xlsx", "AddComment.xlsx");
builder.CloseFile();

Resulting document