GetComments

GetComments() → { Array.<ApiComment> }

Returns all comments related to the whole workbook.

Parameters:

This method doesn't have any parameters.

Returns:

Type
Array.<ApiComment>

Example

Copy code
builder.CreateFile("xlsx");
Api.AddComment("Comment 1", "John Smith");
Api.AddComment("Comment 2", "Mark Potato" );
var arrComments = Api.GetComments();
var oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("A1").SetValue("Comment text: " + arrComments[0].GetText());
oWorksheet.GetRange("A2").SetValue("Comment author: " + arrComments[0].GetAuthorName());
builder.SaveFile("xlsx", "GetComments.xlsx");
builder.CloseFile();

Resulting document