RemoveReplies

function RemoveReplies(nPos: Number = 0, nCount: Number = 1, bRemoveAll: boolean = false): void

Description

Removes the specified comment replies.

Parameters

nPosNumberdefault: 0

The position of the first comment reply to remove.

nCountNumberdefault: 1

A number of comment replies to remove.

bRemoveAllbooleandefault: false

Specifies whether to remove all comment replies or not.

Returns

void

Try It

var oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("A1").SetValue("1");
var oRange = oWorksheet.GetRange("A1");
var oComment = oRange.AddComment("This is just a number.");
oComment.AddReply("Reply 1", "John Smith", "uid-1");
oComment.AddReply("Reply 2", "John Smith", "uid-1");
oComment.RemoveReplies(0, 1, false);
oWorksheet.GetRange("A3").SetValue("Comment replies count: ");
oWorksheet.GetRange("B3").SetValue(oComment.GetRepliesCount());

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).