Get Started
Usage API
More information

GetComments

GetComments() → { Array.<ApiComment> }

Return an ApiComment.

Parameters:

This method doesn't have any parameters.

Returns:

Type
Array.<ApiComment>

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.");
oComments = oWorksheet.GetComments();
oWorksheet.GetRange("A4").SetValue("Comment: " + oComments[0].GetText());
builder.SaveFile("xlsx", "GetComments.xlsx");
builder.CloseFile();

Resulting document