add_copy方法

add_copy(self, source_shape, top_row, top, left_column, left)

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

返回

新的 Shape 对象。


def add_copy(self, source_shape, top_row, top, left_column, left):
    ...
范围类型描述
source_shapeShape源形状。
top_rowint顶行索引。
topint表示距其顶行的垂直偏移,以像素为单位。
left_columnint左列索引。
leftint表示相对于其左列的水平偏移量,以像素为单位。

例子


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

也可以看看