XlsComment module
- class XlsComment.XlsComment
Bases:
XlsShape,IComment,ITextBoxRepresents a comment in an Excel worksheet.
This class provides properties and methods for manipulating comments in Excel, including text formatting, alignment, visibility, and positioning. It extends XlsShape and implements the IComment and ITextBox interfaces.
- property Author: str
Gets or sets the author of the comment.
- Returns:
The name of the author who created the comment.
- Return type:
str
- property AutoSize: bool
Gets or sets whether the comment is automatically sized.
- Returns:
True if the comment is automatically sized; otherwise, False.
- Return type:
bool
- property Column: int
Gets or sets the column index of the cell containing the comment.
- Returns:
The zero-based column index.
- Return type:
int
- property Fill: IShapeFill
Gets the fill formatting of the comment.
- Returns:
An object representing the fill formatting.
- Return type:
IShapeFill
- property HAlignment: CommentHAlignType
Gets or sets the horizontal alignment of the text in the comment.
- Returns:
An enumeration value representing the horizontal alignment.
- Return type:
CommentHAlignType
- property IsTextLocked: bool
Gets or sets whether the text in the comment is locked.
- Returns:
True if the text is locked; otherwise, False.
- Return type:
bool
- property IsVisible: bool
Gets or sets whether the comment is visible.
- Returns:
True if the comment is visible; otherwise, False.
- Return type:
bool
- Remove()
Removes the comment from the worksheet.
- property RichText: IRichTextString
Gets the rich text formatting of the comment text.
- Returns:
An object representing the rich text formatting.
- Return type:
IRichTextString
- property Row: int
Gets or sets the row index of the cell containing the comment.
- Returns:
The zero-based row index.
- Return type:
int
- property ShapeType: ExcelShapeType
Gets the type of the shape.
- Returns:
An enumeration value representing the type of the shape.
- Return type:
ExcelShapeType
- property Text: str
Gets or sets the text content of the comment.
- Returns:
The text content of the comment.
- Return type:
str
- property TextRotation: TextRotationType
Gets or sets the rotation of the text in the comment.
- Returns:
An enumeration value representing the text rotation type.
- Return type:
TextRotationType
- property VAlignment: CommentVAlignType
Gets or sets the vertical alignment of the text in the comment.
- Returns:
An enumeration value representing the vertical alignment.
- Return type:
CommentVAlignType
