[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IComment

IComment Interface

Represents a cell comment.

An IComment is attached to a worksheet cell and provides access to the comment content, author, anchor cell, visibility, and the underlying shape used to display the comment.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public interface IComment
Public Interface IComment
Examples
IComment comment = worksheet.Range["B2"].AddComment("Review this value.");
string text = comment.Text;
IRange anchorCell = comment.AnchorCell;
comment.Visible = true;

Properties

Name Description
AnchorCell

Gets the anchor cell of the comment.

Returns the IRange object to which this comment is attached.

Author

Gets the author of the comment.

Returns the author information associated with the comment.

Shape

Gets the IShape object that represents the shape attached to the comment.

Use the returned shape to configure the comment's layout, such as its size, line, fill, and text formatting.

Text

Gets or sets the comment text.

Visible

Gets or sets whether the comment is visible.

Use this property to check or set whether the comment is visible.

Methods

Name Description
Delete()

Deletes this comment from its cell.

Use this method to remove a single cell comment. To remove comments from multiple cells in a range, use ClearComments().

FromJson(string)

Generates the comment from the specified JSON string.

Use this method to apply serialized comment information to the current comment. The JSON content is typically generated by ToJson().

Next()

Returns the IComment object that represents the next comment.

Returns null if the current comment is the last comment on the worksheet.

Previous()

Returns the IComment object that represents the previous comment.

Returns null if the current comment is the first comment on the worksheet.

ToJson()

Generates a json string from the comment.

The returned string contains the comment information and can be used with FromJson(string) to recreate or update a comment.