Get Started
Usage API
More information

GetComments

GetComments() → { Array.<ApiComment> }

Returns an array of ApiComment objects.

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

Resulting document