Show / Hide Table of Contents

Class ExcelThreadedCommentThread

Represents a thread of ExcelThreadedComments in a cell on a worksheet. Contains functionality to add and modify these comments.

Inheritance
object
ExcelThreadedCommentThread
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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
bool

ThreadedCommentsXml

The raw xml representing this comment thread.

Declaration
public XmlDocument ThreadedCommentsXml { get; }
Property Value
Type Description
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
string personId

Id of the author, see ExcelThreadedCommentPerson

string text

Text of the comment

Returns
Type Description
ExcelThreadedComment

AddComment(string, string, params 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
string personId

Id of the autor

string textWithFormats

A string with format placeholders - same as in string.Format. Index in these should correspond to an index in the personsToMention array.

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
bool

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
string

A string that represents the current object.

Overrides
object.ToString()
In this article
Back to top Generated by DocFX