add_copy method

add_copy

Adds and copy a shape to the worksheet.

Returns

The new Shape object.

def add_copy(self, source_shape, top_row, top, left_column, left):
    ...
ParameterTypeDescription
source_shapeShapeSource shape.
top_rowintThe top row index.
topintRepresents the vertical offset from its top row, in unit of pixel.
left_columnintThe left column index.
leftintRepresents the horizontal offset from its left column, in unit of pixel.

Example


# 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)

See Also