ShapeCollection.AddCopy

ShapeCollection.AddCopy method

Adds and copy a shape to the worksheet.

public Shape AddCopy(Shape sourceShape, int topRow, int top, int leftColumn, int left)
ParameterTypeDescription
sourceShapeShapeSource shape.
topRowInt32The top row index.
topInt32Represents the vertical offset from its top row, in unit of pixel.
leftColumnInt32The left column index.
leftInt32Represents the horizontal offset from its left column, in unit of pixel.

Return Value

The new Shape object.

Examples


[C#]
//add a shape
RectangleShape rectangle = shapes.AddRectangle(2, 0, 2, 0, 130, 130);
//Adds and copies a shape.
shapes.AddCopy(rectangle, 7, 0, 7, 0);

See Also