NativeExcel for .Net Developer's Reference

IWorksheet.Shapes Property

Returns a IShapes interface that represents all the shapes on the worksheet.

[Visual Basic]
PropertyReadOnlyShapesAsIShapes
[C#]
IShapesShapes{get;}
[C++]
__propertyIShapes*get_Shapes();
[JScript]
functiongetShapes():IShapes

Property Value

IShapes interface.

Example

This example adds a picture to worksheet one.

[C#]
book.Worksheets[1].Shapes.AddPicture("myimage.jpg"); 
[VisualBasic]
book.Worksheets(1).Shapes.AddPicture("myimage.jpg")   
[C++]
book->Worksheets->Item[1]->Shapes->AddPicture(S"myimage.jpg");   

See Also

IWorksheet Interface | NativeExcel Namespace | IPicture Interface | IComment Interface