バージョン

Add(PredefinedShapeType,WorksheetCell,PointF,WorksheetCell,PointF) メソッド

定義済みの形状を、指定したアンカーを持つコレクションに追加します。
シンタックス

パラメータ

shapeType
コレクションに追加する形状のタイプ。
topLeftCornerCell
形状の左上角の置かれるセル。
topLeftCornerPosition
パーセントで表される、形状の左上隅の topLeftCornerCell での位置。
bottomRightCornerCell
形状の右下角の置かれるセル。
bottomRightCornerPosition
パーセントで表される、形状の右下隅の bottomRightCornerCell での位置。

戻り値の型

定義済みの図形を表す、WorksheetShape から派生したインスタンス。
例外
例外解説
System.ComponentModel.InvalidEnumArgumentExceptionshapeTypePredefinedShapeType 列挙体で定義されていません。
System.InvalidOperationExceptiontopLeftCornerCell または bottomRightCornerCell は null です。
System.InvalidOperationExceptiontopLeftCornerCell および bottomRightCornerCell は、異なるワークシートか、このコレクションが属するワークシートとは別のワークシートに属しています。
参照