Skip to main content
All docs
V25.1
  • Row

    DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

    Take the survey Not interested

    Worksheet.CreateThreadedCommentAuthor(String, String, String) Method

    Creates a new object that contains information about the comment author.

    Namespace: DevExpress.Spreadsheet

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

    NuGet Package: DevExpress.Spreadsheet.Core

    #Declaration

    ThreadedCommentAuthor CreateThreadedCommentAuthor(
        string name,
        string userId,
        string providerId
    )

    #Parameters

    Name Type Description
    name String

    The name of the author.

    userId String

    The author’s user identifier.

    providerId String

    The author’s provider identifier.

    #Returns

    Type Description
    ThreadedCommentAuthor

    An object that contains the author information.

    #Remarks

    Use this method if you need to specify additional information about the author. Pass the created object as the ThreadedCommentCollection.Add or ThreadedComment.Reply method parameter to create a comment or reply from the specified author.

    #Example

    The code sample below creates a new object, specifies the provider and user identifiers, and uses this object to create a comment:

    var workbook = new Workbook();
    workbook.LoadDocument(@"C:\Docs\Comments.xlsx");
    Worksheet worksheet = workbook.Worksheets[0];
    var comments = worksheet.ThreadedComments;
    
    var author =
      worksheet.CreateThreadedCommentAuthor("Ryan Anita W", "S::ryan.anita@vader.com::ccdb79f7-8acb-46ab-a6d9-4f4340797155", "AD");
    
    comments.Add(worksheet["D5"], author, "Thank you");
    workbook.SaveDocument(@"C:\Docs\Comments_upd.xlsx");
    
    See Also