'Declaration Public Overloads Function Add( _ ByVal shapeType As PredefinedShapeType, _ ByVal topLeftCornerCell As WorksheetCell, _ ByVal topLeftCornerPosition As PointF, _ ByVal bottomRightCornerCell As WorksheetCell, _ ByVal bottomRightCornerPosition As PointF _ ) As WorksheetShape
Exception | Description |
---|---|
System.ComponentModel.InvalidEnumArgumentException | shapeType is not defined in the PredefinedShapeType enumeration. |
System.InvalidOperationException | topLeftCornerCell or bottomRightCornerCell is null. |
System.InvalidOperationException | topLeftCornerCell and bottomRightCornerCell belong to different worksheets or a worksheet other than the worksheet to which this collection belongs. |
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2