Skip to content

Class ExcelCommentCollection

Namespace: OfficeOpenXml
Assembly: EPPlus.dll

Collection of Excel Comment objects

public class ExcelCommentCollection : IEnumerable, IDisposable

Inheritance

object ← ExcelCommentCollection

Implements

IDisposable
IEnumerable

Inherited Members

object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()

Properties

CommentXml

Access to the comment xml document

public XmlDocument CommentXml { get; set; }

Property Value

XmlDocument

Count

Number of comments in the collection

public int Count { get; }

Property Value

int

Worksheet

A reference to the worksheet object

public ExcelWorksheet Worksheet { get; set; }

Property Value

ExcelWorksheet

this[int]

Indexer for the comments collection

public ExcelComment this[int Index] { get; }

Property Value

ExcelComment

this[ExcelCellAddress]

Indexer for the comments collection

public ExcelComment this[ExcelCellAddress cell] { get; }

Property Value

ExcelComment

this[string]

Indexer for the comments collection

public ExcelComment this[string cellAddress] { get; }

Property Value

ExcelComment

Methods

Add(ExcelRangeBase, string, string)

Adds a comment to the top left cell of the range

public ExcelComment Add(ExcelRangeBase cell, string Text, string author = null)

Parameters

cell ExcelRangeBase

The cell

Text string

The comment text

author string

The author for the comment. If this property is null or blank EPPlus will set it to the identity of the ClaimsPrincipal if available otherwise to "Anonymous"

Returns

ExcelComment

The comment

Remove(ExcelComment)

Removes the comment

public void Remove(ExcelComment comment)

Parameters

comment ExcelComment

The comment to remove

RemoveAt(int)

Removes the comment at the specified position

public void RemoveAt(int Index)

Parameters

Index int

The index