Back to Devexpress

RepliedThreadedCommentCollection Interface

officefileapi-devexpress-dot-spreadsheet-91f2cea5.md

latest3.0 KB
Original Source

RepliedThreadedCommentCollection Interface

A collection of comment replies.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public interface RepliedThreadedCommentCollection :
    ISimpleCollection<RepliedThreadedComment>,
    IEnumerable<RepliedThreadedComment>,
    IEnumerable,
    ICollection
vb
Public Interface RepliedThreadedCommentCollection
    Inherits ISimpleCollection(Of RepliedThreadedComment),
             IEnumerable(Of RepliedThreadedComment),
             IEnumerable,
             ICollection

The following members return RepliedThreadedCommentCollection objects:

Remarks

Add a Reply

Call the ThreadedComment.Reply method to add a reply to a comment. You can pass a string or a ThreadedCommentAuthor instance to specify the comment’s author.

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

Remove a Reply

The following methods allow you to remove a reply:

RepliedThreadedCommentCollection.RemoveRemoves the specified reply.RepliedThreadedCommentCollection.RemoveAtRemoves a reply at the specified index in the collection. See Also

RepliedThreadedCommentCollection Members

DevExpress.Spreadsheet Namespace