[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ICommentThreaded.AddReply

AddReply Method

AddReply(string, string)

Adds a reply to this threaded comment.

Adds a reply to this comment's replies collection if the threaded comment is a top-level comment. If this threaded comment is a reply, it adds the new reply to the parent comment's replies collection.

When author is omitted, this method uses an empty author string.

Declaration
ICommentThreaded AddReply(string text, string author = null)
Function AddReply(text As String, Optional author As String = Nothing) As ICommentThreaded
Parameters
Type Name Description
string text

The content of the reply. Must not be null. If this value is empty or contains only whitespace, no reply is added and null is returned.

string author

Optional. The author of the reply. If this value is null or empty, the author is set to an empty string.

Returns
Type Description
ICommentThreaded

The newly added reply. Returns null if text is empty or contains only whitespace.

Examples
ICommentThreaded comment = worksheet.Range["A1"].AddCommentThreaded("Please review the total.", "Alex");
ICommentThreaded reply = comment.AddReply("I updated the total.", "Jamie");
string replyText = reply.Text;
string replyAuthor = reply.Author.Name;
Exceptions
Type Condition
InvalidOperationException

if this threaded comment cannot be replied to because it is resolved, or because it is a reply whose parent comment is resolved.