Skip to end of metadata
Go to start of metadata

Description

A Comment object represents a note attached to a cell, or group of merged cells, separate from other cell content. A Comment must be associated with a cell, and may only be created using set Comment.Visible to true.
C#
vb.net

Properties

Name

Description

Author

Sets or returns the author of the comment. This information is displayed in the status bar in Excel when a comment is selected.

Cell

This returns the Cell object that this comment is associated with.

FitToText

Sets or returns whether the comment's shape will be automatically sized to fit the text.

HorizontalAlignment

Sets or returns the horizontal alignment of text within the comment.

Shape

Return a Shape object representing the display area of the comment. The Shape object may be used to set advanced formatting options such as fill, border, size, or position.

Text

Sets or returns the body text of the comment.

VerticalAlignment

Sets or returns the vertical alignment of text within the comment.

Visible

Sets or returns whether the comment will be visible when the document is opened in Excel. By default, the comment will be hidden, and will be displayed only if the user hovers over the comment's cell.

Methods

Name

Description

ClearRichTextFormatting()

Clears all rich text formatting within the comment. The font of the comment text will be set to the font set (through the ExcelWriter API) for the cell the comment is attached to.

GetCharacters(Int32)

Returns a CharacterRun object representing a range of characters within the comment text. Use this to set the font on specified characters within the text.

GetCharacters(Int32, Int32)

Returns a CharacterRun object representing a range of characters within the comment text. Use this to set the font on specified characters within the text.
  • No labels