[]
Represents a collection of all IShape objects on a worksheet.
This interface provides access to drawing objects on the specified sheet, including shapes, charts, pictures, and connectors. It supports adding new drawing objects, retrieving individual shapes by index or name, creating shape range (IShapeRange) subsets, and iterating through the collection.
public interface IShapes : IEnumerable<IShape>, IEnumerable
Public Interface IShapes
Inherits IEnumerable(Of IShape), IEnumerable
IShapes shapes = worksheet.Shapes;
IShape titleShape = shapes.AddShape(AutoShapeType.Rectangle, 20, 20, 120, 40);
titleShape.TextFrame.TextRange.Text = "Sales";
IShape sameShape = shapes[0];
| Name | Description |
|---|---|
| Count | Gets the number of IShape objects in this collection. Use this property to get the current number of IShape objects in the IShapes collection for a worksheet. |
| this[int] | Gets the IShape at the specified index in this collection. |
| this[string] | Gets the IShape with the specified name from this collection. |
| Range | Returns a IShapeRangeProvider object that receives parameters of the Range property. |
| Name | Description |
|---|---|
| AddCameraPicture(string, IRange) | Creates a camera picture from a reference range and places it in the specified target range on the current sheet.
The worksheet that contains |
| AddCameraPicture(string, double, double) | Creates a camera picture from a reference range and places it at the specified position.
Returns the IShape object that represents the new picture.
The |
| AddCameraPicture(string, double, double, double, double) | Creates a camera picture from a reference range. Returns the IShape object that represents the new picture. The picture is placed at the specified position and sized using point units. |
| AddCameraPicture(string, string, IRange) | Creates a camera picture from a referenced source range and places it in the specified target range on the current sheet.
A camera picture is a dynamic linked picture of the referenced range. The sheet of the target |
| AddCameraPicture(string, string, double, double) | Creates a camera picture from a reference range and places it at the specified position.
The returned picture is generated from the source range and remains linked to that range.
Use |
| AddCameraPicture(string, string, double, double, double, double) | Creates a camera picture from a reference range and places it at the specified position and size.
The returned picture is generated from the source range and remains linked to that range.
Use |
| AddChart(ChartType, IRange) | Creates a chart at the specified range on the current sheet. The sheet of the target range and the sheet to which the shape is added must be the same sheet. |
| AddChart(ChartType, double, double, double, double) | Creates a chart at the specified location on the active sheet. Use the position and size arguments, in points, to place the chart on the worksheet. The returned IShape contains the chart and can be used to access the chart through Chart. |
| AddChart(string, ChartType, IRange) | Creates a chart at the specified range on the current sheet.
The sheet of |
| AddChart(string, ChartType, double, double, double, double) | Creates a chart at the specified location on the active sheet. Use this method to add a chart shape with an explicit name and size. The position and size are measured in points. After the chart is created, use Chart to configure its data series and other chart settings. |
| AddChartInPixel(ChartType, double, double, double, double) | Creates a chart at the specified location on the active sheet. This method positions the chart by using pixel-based coordinates and size values. The returned IShape represents the newly created chart shape. |
| AddChartInPixel(string, ChartType, double, double, double, double) | Creates a chart with the specified name at the specified location on the active sheet. The chart position and size are measured in pixels. |
| AddConnector(ConnectorType, IRange) | Creates a connector at the specified range on the current sheet.
The sheet of |
| AddConnector(ConnectorType, double, double, double, double) | Creates a connector and returns the IShape object that represents the new connector. The connector's starting and end points are specified in points relative to the upper-left corner of the document. |
| AddConnector(string, ConnectorType, IRange) | Creates a connector at the specified range on the current sheet.
The sheet of |
| AddConnector(string, ConnectorType, double, double, double, double) | Creates a connector and returns the IShape object that represents the new connector. Use this method to add a connector by specifying the coordinates of its starting and end points. The coordinate values are measured in points relative to the upper-left corner of the document. |
| AddConnectorInPixel(ConnectorType, double, double, double, double) | Creates a connector and returns the IShape object that represents the new connector. This method uses pixel-based coordinates for the connector's starting and ending points, relative to the upper-left corner of the document. |
| AddConnectorInPixel(string, ConnectorType, double, double, double, double) | Creates a connector and returns the IShape object that represents the new connector. This method uses pixel-based coordinates for the connector's starting and ending points, relative to the upper-left corner of the document. |
| AddPicture(Stream, ImageType, IRange) | Creates a picture from an existing stream at the specified range on the current sheet.
The sheet of |
| AddPicture(Stream, ImageType, double, double, double, double) | Creates a picture from an existing stream. Returns the IShape object that represents the new picture. |
| AddPicture(string, IRange) | Creates a picture from an existing file at the specified range on the current sheet.
The worksheet of |
| AddPicture(string, double, double, double, double) | Creates a picture from an existing file and returns the IShape object that represents the new picture.
Use this method to place a picture at a specific position on the current sheet.
The |
| AddPicture(string, Stream, ImageType, IRange) | Creates a picture from an existing stream at the specified range on the current sheet.
The worksheet of |
| AddPicture(string, Stream, ImageType, double, double, double, double) | Creates a picture from an existing stream. Returns the IShape object that represents the new picture. |
| AddPicture(string, string, IRange) | Creates a picture from an existing file at the specified range on the current sheet.
The worksheet of |
| AddPicture(string, string, double, double, double, double) | Creates a picture from an existing file and adds it to the worksheet at the specified position and size. The picture is positioned in points relative to the upper-left corner of the document. |
| AddPictureInPixel(Stream, ImageType, double, double, double, double) | Creates a picture from an existing stream. Returns the IShape object that represents the new picture. The picture is positioned and sized by the destination rectangle specified in pixels relative to the upper-left corner of the document. |
| AddPictureInPixel(string, double, double, double, double) | Creates a picture from an existing file and returns the IShape object that represents the new picture. The picture is positioned and sized by the destination rectangle specified in pixels relative to the upper-left corner of the document. |
| AddPictureInPixel(string, Stream, ImageType, double, double, double, double) | Creates a picture with the specified name from an existing stream. Returns the IShape object that represents the new picture. The picture is positioned and sized by the destination rectangle specified in pixels relative to the upper-left corner of the document. |
| AddPictureInPixel(string, string, double, double, double, double) | Creates a picture from an existing file. Returns the IShape object that represents the new picture. Use this method to insert a picture at the specified position and size, with all coordinates and dimensions measured in pixels. |
| AddShape(AutoShapeType, IRange) | Returns the IShape object that represents the new preset shape at the specified range on the current sheet.
The sheet of |
| AddShape(AutoShapeType, double, double, double, double) | Adds a new preset shape to the worksheet and returns the created IShape object. The shape is created at the specified position and size, measured in points relative to the upper-left corner of the document. |
| AddShape(string, AutoShapeType, IRange) | Returns the IShape object that represents the new preset shape at the specified range on the current sheet.
The sheet of |
| AddShape(string, AutoShapeType, double, double, double, double) | Returns the IShape object that represents the new preset shape in a worksheet. Creates a preset shape with the specified name, type, position, and size. The shape name can be used to retrieve the created shape from the worksheet's shape collection. |
| AddShapeInPixel(AutoShapeType, double, double, double, double) | Creates a new preset shape in the worksheet using pixel-based position and size. This method returns the IShape object that represents the new preset shape. The specified pixel values are converted to points before the shape is created. |
| AddShapeInPixel(string, AutoShapeType, double, double, double, double) | Creates a preset shape with the specified name at the specified location on the worksheet.
The shape position and size are measured in pixels. The |