add_copy方法

add_copy(source_shape, upper_left_row, top, upper_left_column, left)

添加形状并将其复制到工作表。

返回

新的形状对象索引。

def add_copy(self, source_shape, upper_left_row, top, upper_left_column, left):
    ...
范围类型描述
source_shapeShape源形状。
upper_left_rowint左上行索引。
topint表示复选框相对于其左行的垂直偏移量,以像素为单位。
upper_left_columnint左上列索引。
leftint表示文本框与其左列的水平偏移量,以像素为单位。

例子


# add a shape
rectangle = shapes.add_rectangle(2, 0, 2, 0, 130, 130)
# copy
shapes.add_copy(rectangle, 7, 0, 7, 0)

也可以看看