Comment

Comment class

Encapsulates the object that represents a cell comment.

Methods

NameDescription
characters(startIndex, length)Returns a Characters object that represents a range of characters within the comment text.
formatCharacters(startIndex, length, font, flag)Format some characters with 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.
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 n
getNote()Represents the content of comment. If this is a threaded comment, the note could not be changed, otherwise MS Excel coul
getRichFormattings()Returns all Characters objects that represents a range of characters within the comment text.
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
getTextOrientationType()Gets and sets the text orientation type of the comment. The value of the property is TextOrientationType integer constan
getTextVerticalAlignment()Gets and sets the text vertical alignment type of the comment. The value of the property is TextAlignmentType integer co
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 n
setNote()Represents the content of comment. If this is a threaded comment, the note could not be changed, otherwise MS Excel coul
setTextHorizontalAlignment()Gets and sets the text horizontal alignment type of the comment. The value of the property is TextAlignmentType integer
setTextOrientationType()Gets and sets the text orientation type of the comment. The value of the property is TextOrientationType integer constan
setTextVerticalAlignment()Gets and sets the text vertical alignment type of the comment. The value of the property is TextAlignmentType integer co
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.

characters(startIndex, length)

Returns a Characters object that represents a range of characters within the comment text.

ParameterTypeDescription
startIndexNumberThe index of the start of the character.
lengthNumberThe number of characters.

Returns: FontSetting — FontSetting Characters object.

formatCharacters(startIndex, length, font, flag)

Format some characters with the font setting.

ParameterTypeDescription
startIndexNumberThe start index.
lengthNumberThe length.
fontFontThe font setting.
flagStyleFlagThe 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.

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()

Returns all Characters objects that represents a range of characters within the comment text.

Returns: Array ofFontSetting — Array ofFontSetting 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.