TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

GetComment

GetComment() → { ApiComment | null }

Returns the ApiComment object of the current range.

Parameters:

This method doesn't have any parameters.

Returns:

Type
ApiComment | null

Example

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

Resulting document