add_rectangle方法

add_rectangle(self, upper_left_row, top, upper_left_column, left, height, width)

向工作表添加一个 RectangleShape。

返回

RectangleShape 对象。


def add_rectangle(self, upper_left_row, top, upper_left_column, left, height, width):
    ...
范围类型描述
upper_left_rowint左上行索引。
topint表示 RectangleShape 相对于其左行的垂直偏移量,以像素为单位。
upper_left_columnint左上角的列索引。
leftint表示 RectangleShape 相对于其左列的水平偏移量,以像素为单位。
heightint表示矩形的高度,以像素为单位。
widthint表示 RectangleShape 的宽度,以像素为单位。

例子


#  add a rectangle
rectangleShape = shapes.add_rectangle(2, 0, 2, 0, 130, 130)

也可以看看