Comment
Source: aspose.
Encapsulates the object that represents a cell comment.
Methods
Methods
characters(startIndex, length) → FontSetting
Returns a Characters object that represents a range of characters within the comment text.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
startIndex |
Number |
|
The index of the start of the character. |
length |
Number |
|
The number of characters. |
- Returns
-
FontSetting
Characters object.
formatCharacters(startIndex, length, font, flag)
Format some characters with the font setting.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
startIndex |
Number |
|
The start index. |
length |
Number |
|
The length. |
font |
|
The font setting. |
|
flag |
|
The flag of the font setting. |
getAuthor()
Gets and sets Name of the original comment author
getAutoSize()
Indicates if size of comment is adjusted automatically according to its content.
getCharacters() → ArrayList
Returns all Characters objects that represents a range of characters within the comment text. NOTE: This method is now obsolete. Instead, please use Comment.GetRichFormattings() method. This method will be removed 12 months later since November 2023. Aspose apologizes for any inconvenience you may have experienced.
- Returns
-
ArrayList
All Characters objects
getColumn()
Gets the column index of the comment.
getCommentShape()
Get a Shape object that represents the shape attached to the specified comment.
getFont()
Gets the font of comment.
getHeight()
Represents the Height of the comment, in unit of pixels.
getHeightCM()
Represents the height of the comment, in unit of centimeters.
getHeightInch()
Represents the height of the comment, in unit of inches.
getHtmlNote()
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.
getNote()
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.
getRichFormattings() → Array of FontSetting
Returns all Characters objects that represents a range of characters within the comment text.
- Returns
-
Array of FontSetting
All Characters objects
getRow()
Gets the row index of the comment.
getTextHorizontalAlignment()
Gets and sets the text horizontal alignment type of the comment. The value of the property is TextAlignmentType integer constant.
getTextOrientationType()
Gets and sets the text orientation type of the comment. The value of the property is TextOrientationType integer constant.
getTextVerticalAlignment()
Gets and sets the text vertical alignment type of the comment. The value of the property is TextAlignmentType integer constant.
getThreadedComments()
Gets the list of threaded comments;
getWidth()
Represents the width of the comment, in unit of pixels.
getWidthCM()
Represents the width of the comment, in unit of centimeters.
getWidthInch()
Represents the width of the comment, in unit of inches.
isThreadedComment()
Indicates whether this comment is a threaded comment.
isVisible()
Represents if the comment is visible or not.
setAuthor()
Gets and sets Name of the original comment author
setAutoSize()
Indicates if size of comment is adjusted automatically according to its content.
setHeight()
Represents the Height of the comment, in unit of pixels.
setHeightCM()
Represents the height of the comment, in unit of centimeters.
setHeightInch()
Represents the height of the comment, in unit of inches.
setHtmlNote()
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.
setNote()
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.
setTextHorizontalAlignment()
Gets and sets the text horizontal alignment type of the comment. The value of the property is TextAlignmentType integer constant.
setTextOrientationType()
Gets and sets the text orientation type of the comment. The value of the property is TextOrientationType integer constant.
setTextVerticalAlignment()
Gets and sets the text vertical alignment type of the comment. The value of the property is TextAlignmentType integer constant.
setVisible()
Represents if the comment is visible or not.
setWidth()
Represents the width of the comment, in unit of pixels.
setWidthCM()
Represents the width of the comment, in unit of centimeters.
setWidthInch()
Represents the width of the comment, in unit of inches.