Back to Devexpress

ThreadedComment.Reply(String, String) Method

officefileapi-devexpress-dot-spreadsheet-dot-threadedcomment-dot-reply-x28-system-dot-string-system-dot-string-x29.md

latest2.3 KB
Original Source

ThreadedComment.Reply(String, String) Method

Adds a reply to the comment.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
RepliedThreadedComment Reply(
    string authorName,
    string text
)
vb
Function Reply(
    authorName As String,
    text As String
) As RepliedThreadedComment

Parameters

NameTypeDescription
authorNameString

The name of the reply author.

| | text | String |

The text of the reply.

|

Returns

TypeDescription
RepliedThreadedComment

The reply to the comment.

|

Example

The code sample below adds a reply to the first comment:

csharp
using DevExpress.Spreadsheet;

var workbook = new Workbook();
workbook.LoadDocument(@"C:\Docs\Comments.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
var comments = worksheet.ThreadedComments;

ThreadedComment threadedComment = comments[0];
threadedComment.Reply("Nancy Davolio", "Thanks for the hint");
workbook.SaveDocument(@"C:\Docs\Comments_upd.xlsx");
vb
Imports DevExpress.Spreadsheet

Private workbook = New Workbook()
workbook.LoadDocument("C:\Docs\Comments.xlsx")
Dim worksheet As Worksheet = workbook.Worksheets(0)
Dim comments = worksheet.ThreadedComments

Dim threadedComment As ThreadedComment = comments(0)
threadedComment.Reply("Nancy Davolio", "Thanks for the hint")
workbook.SaveDocument("C:\Docs\Comments_upd.xlsx")

See Also

ThreadedComment Interface

ThreadedComment Members

DevExpress.Spreadsheet Namespace