Returns a single IShape interface from a Shapes collection using one-based index number.
[C#] In C#, this property is the indexer for the IShapes class.
[Visual Basic] Default Property ReadOnly Item( _ ByVal index As Integer _ ) As IShape [C#] IShape this[ int index ] { get; } [C++] __property IShape* get_Item( int index ); [JScript] returnValue = IShapesObject.Item( index ); -or- returnValue = IShapesObject( index );
[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.
IShape interface.
This example deletes first shape from the shape collection on sheet one.
[C#]
IShape shape = book.Worksheets[1].Shapes[1];
if (shape != null) shape.Delete();
[Visual Basic]
Dim shape As IShape = book.Worksheets(1).Shapes(1)
If Not shape Is Nothing Then
shape.Delete()
End If
[C++]
IShape* shape = book->Worksheets->Item[1]->Shapes->Item[1];
if (shape != null) shape->Delete();
IShapes Interface | NativeExcel Namespace