Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / ThreadCommentCollection Class
Members Example


In This Topic
    ThreadCommentCollection Class
    In This Topic
    Contains a collection of the various threads of Comments that can be found in the Worksheet.
    Syntax
    'Declaration
     
    
    <DefaultMemberAttribute("Item")>
    Public Class ThreadCommentCollection 
       Inherits WorksheetElement
    'Usage
     
    
    Dim instance As ThreadCommentCollection
    [DefaultMember("Item")]
    public class ThreadCommentCollection : WorksheetElement 
    Example
    using( var workbook = Workbook.Create( "AddComment.xlsx" ) ) 
      { 
        // Gets the first Worksheet; a Workbook always contains at least 1 Worksheet. 
        var worksheet = workbook.Worksheets[ 0 ]; 
    
        // Gets the annotations collection. 
        var annotations = worksheet.Annotations; 
    
        // Adds a Comment attached to Cell B1. 
        var comment = annotations.AddComment( "This is the title of the document", "B1" ); 
    
        // Replies to the Comment. 
        comment.Reply( "Wait I can also be in the thread of the conversation ?" ); 
    
        // Gets the thread of Comments. 
        var threadCommentCollection = annotations.Comments; 
    
        // Gets the number of Comments in the thread for Cell "B1". 
        var thread1_Count = threadCommentCollection[ "B1" ].Count; 
    
        // Saves Workbook to disk; 
        workbook.Save(); 
      }
    Inheritance Hierarchy

    System.Object
       Xceed.Workbooks.NET.WorkbookElement
          Xceed.Workbooks.NET.WorksheetElement
             Xceed.Workbooks.NET.ThreadCommentCollection

    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also