Class ExcelThreadedCommentThread
Represents a thread of ExcelThreadedComments in a cell on a worksheet. Contains functionality to add and modify these comments.
Inheritance
Inherited Members
Namespace: OfficeOpenXml.ThreadedComments
Assembly: EPPlus.dll
Syntax
public class ExcelThreadedCommentThread
Properties
CellAddress
The address of the cell of the comment thread
Declaration
public ExcelCellAddress CellAddress { get; }
Property Value
Type | Description |
---|---|
ExcelCellAddress |
Comments
A collection of comments in the thread.
Declaration
public ExcelThreadedCommentCollection Comments { get; }
Property Value
Type | Description |
---|---|
ExcelThreadedCommentCollection |
IsResolved
If true the thread is resolved, i.e. closed for edits or further comments.
Declaration
public bool IsResolved { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ThreadedCommentsXml
The raw xml representing this comment thread.
Declaration
public XmlDocument ThreadedCommentsXml { get; }
Property Value
Type | Description |
---|---|
System.Xml.XmlDocument |
Worksheet
The worksheet where this comment thread resides
Declaration
public ExcelWorksheet Worksheet { get; }
Property Value
Type | Description |
---|---|
ExcelWorksheet |
Methods
AddComment(String, String)
Adds a ExcelThreadedComment to the thread
Declaration
public ExcelThreadedComment AddComment(string personId, string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | personId | Id of the author, see ExcelThreadedCommentPerson |
System.String | text | Text of the comment |
Returns
Type | Description |
---|---|
ExcelThreadedComment |
AddComment(String, String, ExcelThreadedCommentPerson[])
Adds a ExcelThreadedComment with mentions in the text to the thread.
Declaration
public ExcelThreadedComment AddComment(string personId, string textWithFormats, params ExcelThreadedCommentPerson[] personsToMention)
Parameters
Type | Name | Description |
---|---|---|
System.String | personId | Id of the autor |
System.String | textWithFormats | A string with format placeholders - same as in string.Format. Index in these should correspond to an index in the |
ExcelThreadedCommentPerson[] | personsToMention | A params array of ExcelThreadedCommentPerson. Their DisplayName property will be used to replace the format placeholders. |
Returns
Type | Description |
---|---|
ExcelThreadedComment | The added ExcelThreadedComment |
DeleteThread()
Deletes all ExcelThreadedComments in the thread and the legacy ExcelComment in the cell.
Declaration
public void DeleteThread()
Remove(ExcelThreadedComment)
Removes a ExcelThreadedComment from the thread.
Declaration
public bool Remove(ExcelThreadedComment comment)
Parameters
Type | Name | Description |
---|---|---|
ExcelThreadedComment | comment | The comment to remove |
Returns
Type | Description |
---|---|
System.Boolean | true if the comment was removed, otherwise false |
ReopenThread()
Re-opens a resolved thread.
Declaration
public void ReopenThread()
ResolveThread()
Closes the thread, only the author can re-open it.
Declaration
public void ResolveThread()
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents the current object. |