Static
$tStatic
nextGets or sets the cell where the bottom-right corner of the shape resides.
This anchor cell, along with the topLeftCornerCell, determines where the shape will be positioned on the worksheet. In addition, the bottomRightCornerPosition and topLeftCornerPosition properties allow for finer control of the shape's position.
The cell where the bottom-right corner of the shape resides.ArgumentException The value assigned is a cell whose worksheet is not the same as this shape's worksheet.
ArgumentNullException The value assigned is null and this shape already exists on a worksheet or group.
Gets or sets the position in the bottomRightCornerCell of the shape's bottom-right corner, expressed in percentages.
These percentages are expressed as distance across the associated dimension of the cell, starting at the top-left corner of the cell. For example, (0.0, 0.0) represents the top-left corner of the cell, whereas (100.0, 100.0) represents the bottom-right corner of the cell. (50.0, 10.0) would represent the location in the cell which is centered horizontally, and a tenth of the way down from the top.
The position in the bottom-right corner cell of the shape's bottom-right corner.ArgumentOutOfRangeException Either coordinate of the value assigned is outside the range of 0.0 to 100.0.
Gets or sets the fill to use in the background of the shape.
Note: some shapes, such as connectors or groups, cannot have a fill set. For these shapes, the value on this property will be ignored and lost when the workbook is saved.
A ShapeFill-derived instance describing the fill of the shape, or null for no fill.Gets or sets the value which indicates whether the shape is flipped horizontally along the vertical center line.
InvalidOperationException The value is set to True and this shape doesn't allow flipping or rotating, such as a WorksheetChart.
Gets or sets the value which indicates whether the shape is flipped vertically along the horizontal center line.
InvalidOperationException The value is set to True and this shape doesn't allow flipping or rotating, such as a WorksheetChart.
Gets or sets the outline to use for the shape.
Note: some shapes, such as comments or groups, cannot have a outline set. For these shapes, the value on this property will be ignored and lost when the workbook is saved.
A ShapeOutline-derived instance describing the outline of the shape, or null for no outline.Gets or sets the way shapes will be repositioned in excel when cells before or within the shape are resized.
This value will not be saved for shapes contained in a WorksheetShapeGroup, which inherit their positioning mode from their parent group.
The way shapes will be repositioned in excel when cells before or within the shape are resized.InvalidEnumArgumentException The value assigned is not defined in the ShapePositioningMode enumeration.
Gets or sets the cell where the top-left corner of the shape resides.
This anchor cell, along with the bottomRightCornerCell, determines where the shape will be positioned on the worksheet. In addition, the bottomRightCornerPosition and topLeftCornerPosition properties allow for finer control of the shape's position.
The cell where the top-left corner of the shape resides.ArgumentException The value assigned is a cell whose worksheet is not the same as this shape's worksheet.
ArgumentNullException The value assigned is null and this shape already exists on a worksheet or group.
Gets or sets the position in the topLeftCornerCell of the shape's top-left corner, expressed in percentages.
These percentages are expressed as distance across the associated dimension of the cell, starting at the top-left corner of the cell. For example, (0.0, 0.0) represents the top-left corner of the cell, whereas (100.0, 100.0) represents the bottom-right corner of the cell. (50.0, 10.0) would represent the location in the cell which is centered horizontally, and a tenth of the way down from the top.
The position in the top-left corner cell of the shape's top-left corner.ArgumentOutOfRangeException Either coordinate of the value assigned is outside the range of 0.0 to 100.0.
Gets or sets the value indicating whether the shape is visible on the worksheet. The value indicating whether the shape is visible on the worksheet.
Clears the cached unknown shape data which was read in from a parsed excel file.
This method will only be needed until all shape information is supported and customizable. After all shape data can be controlled, this method will become obsolete. Currently, all unsupported data will be stored with the shape for round-tripping purposes. For example, if an Excel file with complex and unsupported shapes is loaded into a Workbook instance, some cell values are changed, and it is saved to the same file, the complex shapes will still exist in the workbook. However, if a loaded shape needs to be modified before it is saved back, this method allows for that unsupported data to be removed while all supported data is maintained.
Note: This method only clears unsupported data. In future versions of the product, as more shape data is supported, this method will have different effects on the shape, until eventually all data is supported and this method will have no effect on the shape.
InvalidOperationException This method is called on an UnknownShape instance.
Gets the bounds of the shape in twips (1/20th of a point).
The bounds returned by this method are only valid with the current configuration of the worksheet. If any rows or columns before or within the shape are resized, these bounds will no longer reflect the position of the shape.
InvalidOperationException The topLeftCornerCell or bottomRightCornerCell are null, in which case the shape has no bounds.
The bounds of the shape on its worksheet.
Gets the bounds of the shape in twips (1/20th of a point).
The bounds returned by this method are only valid with the current configuration of the worksheet. If any rows or columns before or within the shape are resized, these bounds will no longer reflect the position of the shape.
InvalidOperationException The topLeftCornerCell or bottomRightCornerCell are null, in which case the shape has no bounds.
The bounds of the shape on its worksheet.
The options to use when getting the bounds of the shape.
Sets the bounds of the shape in twips (1/20th of a point).
The shape will only be positioned at the specified bounds while the worksheet remains in the current configuration. Depending on the positioningMode of the shape, it may change bounds if any rows or columns before or within the shape are resized.
ArgumentNullException 'sheet' is null.
The worksheet on which the shape should be placed.
The new bounds where the shape should be placed.
Sets the bounds of the shape in twips (1/20th of a point).
The shape will only be positioned at the specified bounds while the worksheet remains in the current configuration. Depending on the positioningMode of the shape, it may change bounds if any rows or columns before or within the shape are resized.
ArgumentNullException s
'sheet' is null.
The sheet on which the shape should be placed.
The new bounds where the shape should be placed.
The options to use when setting the bounds of the shape.
Gets the shape at the specified index in the collection. The shape at the specified index.
ArgumentOutOfRangeException 'index' is less than zero or 'index' is greater than or equal to count.
The zero-based index of the shape to get.
Gets the collection of shapes contained in the group. The collection of shapes contained in the group.
Static
compareStatic
compareStatic
createCreates a shape which is predefined in Microsoft Excel.
InvalidEnumArgumentException 'shapeType' is not defined in the PredefinedShapeType enumeration.
A WorksheetShape-derived instance representing the predefined shape.
The type of shape to create.
Static
equalsStatic
equalsStatic
getStatic
getStatic
getStatic
referenceStatic
static
Represents a group of shapes in a worksheet. This group is also a shape which can be positioned and contained within another group or on a worksheet.