Page tree
Skip to end of metadata
Go to start of metadata

Description

The Shapes collection contains all Shape objects in the worksheet. To return a Shapes collection, use Worksheet.Shapes.

C#
vb.net

Properties

Name

Description

Count

Returns the number of Shape objects in the collection.

Indexers

Name

Description

Item(Int32)

Returns the Shape object at the specified position in the Shapes collection.

Item(String)

Returns the Shape object with the specified name in the Shapes collection.

Methods

Name

Description

AddShape(Shape)

Adds the specified Shape object to the Shapes collection.

CreateShape(ShapeType, Anchor)

Creates a Shape with the specified position and shape type. The specified shape type must not be Picture, Group, Comment, or Unknown. The new shape is automatically added to the Shapes collection.

GetEnumerator()

Returns an IEnumerator for this Shapes collection.

ListShapes()

Lists all the Shape objects in the Shapes collection. This does not return the underlying collection, so changes to the returned value will have no effect on future calls to this Shapes object.

Remove(Int32)

Removes the Shape object at the specified position from the collection. The position will correspond to the position of the Shape within the array returned by ListShapes.

Remove(Shape)

Removes the specified Shape object from the collection. If the specified Shape object does not exist in the collection, no change is made.
  • No labels