Table of Contents

Class ExcelCommentCollection

Namespace
OfficeOpenXml
Assembly
EPPlus.dll

Collection of Excel Comment objects

public class ExcelCommentCollection : IEnumerable, IDisposable
Inheritance
ExcelCommentCollection
Implements
Inherited Members

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

this[ExcelCellAddress]

Indexer for the comments collection

public ExcelComment this[ExcelCellAddress cell] { get; }

Parameters

cell ExcelCellAddress

The cell

Property Value

ExcelComment

The comment

this[int]

Indexer for the comments collection

public ExcelComment this[int Index] { get; }

Parameters

Index int

The index

Property Value

ExcelComment

The comment

this[string]

Indexer for the comments collection

public ExcelComment this[string cellAddress] { get; }

Parameters

cellAddress string

The cell address

Property Value

ExcelComment

The comment

Worksheet

A reference to the worksheet object

public ExcelWorksheet Worksheet { get; set; }

Property Value

ExcelWorksheet

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