Table of Contents

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

ExcelCellAddress

Comments

A collection of comments in the thread.

public ExcelThreadedCommentCollection Comments { get; }

Property Value

ExcelThreadedCommentCollection

IsResolved

If true the thread is resolved, i.e. closed for edits or further comments.

public bool IsResolved { get; }

Property Value

bool

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

ExcelWorksheet

Methods

AddComment(string, string)

Adds a ExcelThreadedComment to the thread

public ExcelThreadedComment AddComment(string personId, string text)

Parameters

personId string

Id of the author, see ExcelThreadedCommentPerson

text string

Text of the comment

Returns

ExcelThreadedComment

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 string

Id of the autor

textWithFormats string

A 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 ExcelThreadedComment

The 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.