GemBox.Spreadsheet

ExcelCell.Comment Property

Gets or sets cell comment.

public override ExcelComment Comment {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.

Suported only in xlsx.

Example

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

  1. comment text setting
  2. comment' IsVisible property in action
[Visual Basic]
        
    excelFile.Worksheets(0).Cells(0, 0).Comment.Text = "comment1" 
    excelFile.Worksheets(0).Cells(0, 0).Comment.IsVisible = False
[C#]
    excelFile.Worksheets[ 0 ].Cells[ 0, 0 ].Comment.Text = "comment1";
    excelFile.Worksheets[ 0 ].Cells[ 0, 0 ].Comment.IsVisible = false;

See Also

ExcelCell Class | GemBox.Spreadsheet Namespace