Aspose::Cells::Drawing::ShapeCollection::AddShape method

ShapeCollection::AddShape method

Adds a Shape to the worksheet.

Shape Aspose::Cells::Drawing::ShapeCollection::AddShape(MsoDrawingType type, int32_t upperLeftRow, int32_t top, int32_t upperLeftColumn, int32_t left, int32_t height, int32_t width)
ParameterTypeDescription
typeMsoDrawingTypeMso drawing type.
upperLeftRowint32_tUpper left row index.
topint32_tRepresents the vertical offset of Shape from its left row, in unit of pixel.
upperLeftColumnint32_tUpper left column index.
leftint32_tRepresents the horizontal offset of Shape from its left column, in unit of pixel.
heightint32_tRepresents the height of Shape, in unit of pixel.
widthint32_tRepresents the width of Shape, in unit of pixel.

ReturnValue

A Shape object.

Remarks

The type could not be Chart/Comment/Picture/OleObject/Polygon/DialogBox

Examples

    //Add a shape of the specified type
Shape shapeByType = shapes.AddShape(MsoDrawingType::CellsDrawing, 1, 0, 1, 0, 100, 50);

See Also