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_shape | Shape | 源形状。 |
| upper_left_row | int | 左上行索引。 |
| top | int | 表示复选框相对于其左行的垂直偏移量,以像素为单位。 |
| upper_left_column | int | 左上列索引。 |
| left | int | 表示文本框与其左列的水平偏移量,以像素为单位。 |
例子
# add a shape
rectangle = shapes.add_rectangle(2, 0, 2, 0, 130, 130)
# copy
shapes.add_copy(rectangle, 7, 0, 7, 0)