Comment
Comment class
Encapsulates the object that represents a cell comment.
Properties
| Name | Type | Description |
|---|---|---|
| Author | String | Gets and sets Name of the original comment author |
| CommentShape | CommentShape | Get a Shape object that represents the shape attached to the specified comment. |
| Row | int | Gets the row index of the comment. |
| Column | int | Gets the column index of the comment. |
| IsThreadedComment | boolean | Indicates whether this comment is a threaded comment. |
| ThreadedComments | ThreadedCommentCollection | Gets the list of threaded comments; |
| Note | String | Represents the content of comment. If this is a threaded comment, the note could not be changed, otherwise MS Excel coul |
| HtmlNote | String | Gets and sets the html string which contains data and some formats in this comment. If this is a threaded comment, the n |
| Font | Font | Gets the font of comment. |
| IsVisible | boolean | Represents if the comment is visible or not. |
| TextOrientationType | int | Gets and sets the text orientation type of the comment. The value of the property is TextOrientationType integer constan |
| TextHorizontalAlignment | int | Gets and sets the text horizontal alignment type of the comment. The value of the property is TextAlignmentType integer |
| TextVerticalAlignment | int | Gets and sets the text vertical alignment type of the comment. The value of the property is TextAlignmentType integer co |
| AutoSize | boolean | Indicates if size of comment is adjusted automatically according to its content. |
| HeightCM | float | Represents the height of the comment, in unit of centimeters. |
| WidthCM | float | Represents the width of the comment, in unit of centimeters. |
| Width | int | Represents the width of the comment, in unit of pixels. |
| Height | int | Represents the Height of the comment, in unit of pixels. |
| WidthInch | float | Represents the width of the comment, in unit of inches. |
| HeightInch | float | Represents the height of the comment, in unit of inches. |
Methods
| Name | Description |
|---|---|
| formatCharacters | Format some characters with the font setting. |
| characters | Returns a Characters object that represents a range of characters within the comment text. |
| getRichFormattings | Returns all Characters objects that represents a range of characters within the comment text. |
Comment.Author property
Gets and sets Name of the original comment author
Type: String
Comment.CommentShape property
Get a Shape object that represents the shape attached to the specified comment.
Type: CommentShape
Comment.Row property
Gets the row index of the comment.
Type: int
Comment.Column property
Gets the column index of the comment.
Type: int
Comment.IsThreadedComment property
Indicates whether this comment is a threaded comment.
Type: boolean
Comment.ThreadedComments property
Gets the list of threaded comments;
Type: ThreadedCommentCollection
Comment.Note property
Represents the content of comment. If this is a threaded comment, the note could not be changed, otherwise MS Excel could not process it as a threaded comment.
Type: String
Comment.HtmlNote property
Gets and sets the html string which contains data and some formats in this comment. If this is a threaded comment, the note could not be changed, otherwise MS Excel could not process it as a threaded comment.
Type: String
Comment.Font property
Gets the font of comment.
Type: Font
Comment.IsVisible property
Represents if the comment is visible or not.
Type: boolean
Comment.TextOrientationType property
Gets and sets the text orientation type of the comment. The value of the property is TextOrientationType integer constant.
Type: int
Comment.TextHorizontalAlignment property
Gets and sets the text horizontal alignment type of the comment. The value of the property is TextAlignmentType integer constant.
Type: int
Comment.TextVerticalAlignment property
Gets and sets the text vertical alignment type of the comment. The value of the property is TextAlignmentType integer constant.
Type: int
Comment.AutoSize property
Indicates if size of comment is adjusted automatically according to its content.
Type: boolean
Comment.HeightCM property
Represents the height of the comment, in unit of centimeters.
Type: float
Comment.WidthCM property
Represents the width of the comment, in unit of centimeters.
Type: float
Comment.Width property
Represents the width of the comment, in unit of pixels.
Type: int
Comment.Height property
Represents the Height of the comment, in unit of pixels.
Type: int
Comment.WidthInch property
Represents the width of the comment, in unit of inches.
Type: float
Comment.HeightInch property
Represents the height of the comment, in unit of inches.
Type: float
formatCharacters(startIndex, length, font, flag)
Format some characters with the font setting.
| Parameter | Type | Description |
|---|---|---|
| startIndex | int | The start index. |
| length | int | The length. |
| font | Font | The font setting. |
| flag | StyleFlag | The flag of the font setting. |
characters(startIndex, length)
Returns a Characters object that represents a range of characters within the comment text.
| Parameter | Type | Description |
|---|---|---|
| startIndex | int | The index of the start of the character. |
| length | int | The number of characters. |
Returns: Characters object.
getRichFormattings()
Returns all Characters objects that represents a range of characters within the comment text.
Returns: All Characters objects