Click or drag to resize
ExcelComment Class
Represents a comment object used by Comment in the worksheet.
Inheritance Hierarchy
SystemObject
  GemBox.SpreadsheetExcelComment

Namespace: GemBox.Spreadsheet
Assembly: GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 39.3.30.1189
Syntax
public class ExcelComment

The ExcelComment type exposes the following members.

Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to this ExcelComment instance.
(Overrides ObjectEquals(Object).)
Public methodGetCharacters(Int32)
Returns a FormattedCharacterRange object that represents a range of characters within the comment text. The range starts at a specified character position. Supported in XLSX only.
Public methodGetCharacters(Int32, Int32)
Returns a FormattedCharacterRange object that represents a range of characters within the comment text. The range starts at a specified character position and has a specified length. Supported in XLSX only.
Public methodGetHashCode
Returns a hash code for this ExcelComment instance.
(Overrides ObjectGetHashCode.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Determines whether first and second ExcelComments are equal.
Public operatorStatic memberInequality
Determines whether first and second ExcelComments are not equal.
Top
Properties
  NameDescription
Public propertyAuthor
Gets or sets comment author.
Public propertyBottomRightCell
Gets or sets the bottom right anchor cell for the comment shape.
Public propertyExists
If comment exists returns true, otherwise returns false.
Public propertyCode exampleIsVisible
Gets or sets a value indicating whether this instance is visible.
Public propertyCode exampleText
Gets the comment text assigned to excel cell
Public propertyTopLeftCell
Gets or sets the top left anchor cell for the comment shape.
Top
Remarks
Supported only in xlsx.
Examples

Following code demonstrates how to use comments. It shows next features:

  1. comment text setting
  2. comment IsVisible property in action
excelFile.Worksheets[0].Cells[0, 0].Comment.Text = "comment1";
excelFile.Worksheets[0].Cells[0, 0].Comment.IsVisible = false;
See Also