Class ExcelCommentCollection
Collection of Excel Comment objects
Inherited Members
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Syntax
public class ExcelCommentCollection : IEnumerable, IDisposable
Properties
CommentXml
Access to the comment xml document
Declaration
public XmlDocument CommentXml { get; set; }
Property Value
| Type | Description |
|---|---|
| XmlDocument |
Count
Number of comments in the collection
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
this[ExcelCellAddress]
Indexer for the comments collection
Declaration
public ExcelComment this[ExcelCellAddress cell] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| ExcelCellAddress | cell | The cell |
Property Value
| Type | Description |
|---|---|
| ExcelComment | The comment |
this[int]
Indexer for the comments collection
Declaration
public ExcelComment this[int Index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | Index | The index |
Property Value
| Type | Description |
|---|---|
| ExcelComment | The comment |
this[string]
Indexer for the comments collection
Declaration
public ExcelComment this[string cellAddress] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| string | cellAddress | The cell address |
Property Value
| Type | Description |
|---|---|
| ExcelComment | The comment |
Worksheet
A reference to the worksheet object
Declaration
public ExcelWorksheet Worksheet { get; set; }
Property Value
| Type | Description |
|---|---|
| ExcelWorksheet |
Methods
Add(ExcelRangeBase, string, string)
Adds a comment to the top left cell of the range
Declaration
public ExcelComment Add(ExcelRangeBase cell, string Text, string author = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ExcelRangeBase | cell | The cell |
| string | Text | The comment text |
| string | author | 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
| Type | Description |
|---|---|
| ExcelComment | The comment |
Remove(ExcelComment)
Removes the comment
Declaration
public void Remove(ExcelComment comment)
Parameters
| Type | Name | Description |
|---|---|---|
| ExcelComment | comment | The comment to remove |
RemoveAt(int)
Removes the comment at the specified position
Declaration
public void RemoveAt(int Index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | Index | The index |