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