Gets or sets cell comment.
Namespace: GemBox.SpreadsheetAssembly: 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:
CopyVB.NET
CopyC#
- comment text setting
- comment' IsVisible property in action
excelFile.Worksheets(0).Cells(0, 0).Comment.Text = "comment1" excelFile.Worksheets(0).Cells(0, 0).Comment.IsVisible = False
excelFile.Worksheets[ 0 ].Cells[ 0, 0 ].Comment.Text = "comment1"; excelFile.Worksheets[ 0 ].Cells[ 0, 0 ].Comment.IsVisible = false;