Gets or sets cell comment.

Namespace: GemBox.Spreadsheet
Assembly: GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 35.0.30.1025

Syntax

C#
public override ExcelComment Comment { get; set; }
Visual Basic
Public Overrides Property Comment As ExcelComment
	Get
	Set

Remarks

You can set comment text, set whether comment will be visible during loading xls file or not. Additinally you can get column or row of the excel cell to which this comment is assigned.

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
CopyVB.NET
excelFile.Worksheets(0).Cells(0, 0).Comment.Text = "comment1" 
excelFile.Worksheets(0).Cells(0, 0).Comment.IsVisible = False
CopyC#
excelFile.Worksheets[ 0 ].Cells[ 0, 0 ].Comment.Text = "comment1";
excelFile.Worksheets[ 0 ].Cells[ 0, 0 ].Comment.IsVisible = false;

See Also