XlsRectangleShape module

class XlsRectangleShape.XlsRectangleShape

Bases: XlsPrstGeomShape, IRectangleShape

Represents a rectangle shape in an Excel worksheet.

This class provides properties and methods for manipulating rectangle shapes, including text, alignment, and hyperlinks.

property HAlignment: CommentHAlignType

Gets or sets the horizontal alignment of text in the rectangle shape.

Returns:

An enumeration value representing the horizontal alignment.

Return type:

CommentHAlignType

Gets the hyperlink associated with the rectangle shape.

Returns:

An object representing the hyperlink associated with the shape.

Return type:

IHyperLink

property IsTextLocked: bool

Gets or sets whether the text in the rectangle shape is locked.

Returns:

True if the text is locked; otherwise, False.

Return type:

bool

property PrstShapeType: PrstGeomShapeType

Gets the preset geometry shape type of the rectangle.

Returns:

An enumeration value representing the preset geometry shape type.

Return type:

PrstGeomShapeType

property RectShapeType: RectangleShapeType

Gets the specific rectangle shape type.

Returns:

An enumeration value representing the specific type of rectangle shape.

Return type:

RectangleShapeType

property RichText: IRichTextString

Gets the rich text formatting for the text in the rectangle shape.

Returns:

An object that represents the rich text formatting.

Return type:

IRichTextString

property ShapeType: ExcelShapeType

Gets the shape type of the rectangle.

Returns:

An enumeration value representing the shape type of the rectangle.

Return type:

ExcelShapeType

property Text: str

Gets or sets the text displayed in the rectangle shape.

Returns:

The text content of the rectangle shape.

Return type:

str

property TextRotation: TextRotationType

Gets or sets the text rotation in the rectangle shape.

Returns:

An enumeration value representing the text rotation.

Return type:

TextRotationType

property VAlignment: CommentVAlignType

Gets or sets the vertical alignment of text in the rectangle shape.

Returns:

An enumeration value representing the vertical alignment.

Return type:

CommentVAlignType