add_copy method

add_copy

Adds and copy a shape to the worksheet.

Returns

The new shape object index.

def add_copy(self, source_shape, upper_left_row, top, upper_left_column, left):
    ...
ParameterTypeDescription
source_shapeShapeSource shape.
upper_left_rowintUpper left row index.
topintRepresents the vertical offset of checkbox from its left row, in unit of pixel.
upper_left_columnintUpper left column index.
leftintRepresents the horizontal offset of textbox from its left column, in unit of pixel.

Example


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

See Also