GetComments
Returns all comments related to the whole workbook.
Syntax
expression.GetComments();
expression
- A variable that represents a Api class.
Parameters
This method doesn't have any parameters.
Returns
Example
This example shows how to get an array of ApiComment objects.
- Code
- Result
Api.AddComment("Comment 1", "Bob");
Api.AddComment("Comment 2", "Bob");
let arrComments = Api.GetComments();
let worksheet = Api.GetActiveSheet();
worksheet.GetRange("A1").SetValue("Comment Text: ", arrComments[0].GetText());
worksheet.GetRange("B1").SetValue("Comment Author: ", arrComments[0].GetAuthorName());