GetAllComments

function GetAllComments(): ApiComment[]

Description

Returns all comments from the current workbook including comments from all worksheets.

Returns

ApiComment[]

Try It

var oWorksheet = Api.GetActiveSheet();
Api.AddComment("Comment 1", "John Smith");
oWorksheet.GetRange("A4").AddComment("Comment 2", "Mark Potato" );
var arrComments = Api.GetAllComments();
oWorksheet.GetRange("A1").SetValue("Comment text: " + arrComments[1].GetText());
oWorksheet.GetRange("A2").SetValue("Comment author: " + arrComments[1].GetAuthorName());

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).