officefileapi-devexpress-dot-spreadsheet-dot-threadedcomment-dot-reply-x28-system-dot-string-system-dot-string-x29.md
Adds a reply to the comment.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
RepliedThreadedComment Reply(
string authorName,
string text
)
Function Reply(
authorName As String,
text As String
) As RepliedThreadedComment
| Name | Type | Description |
|---|---|---|
| authorName | String |
The name of the reply author.
| | text | String |
The text of the reply.
|
| Type | Description |
|---|---|
| RepliedThreadedComment |
The reply to the comment.
|
The code sample below adds a reply to the first comment:
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");
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