Excel for UWP/WinRT
XLPictureShape コンストラクタ(WriteableBitmap,Int32,Int32)
使用例 

新しい XLPictureShape に格納されている画像。
セルに対する新しい図形の水平位置(ツイップ単位)。
セルに対する新しい図形の垂直位置(ツイップ単位)。
XLPictureShape の新しいインスタンスを初期化します。
構文
'宣言
 
Public Function New( _
   ByVal img As Windows.UI.Xaml.Media.Imaging.WriteableBitmap, _
   ByVal x As System.Integer, _
   ByVal y As System.Integer _
)
public XLPictureShape( 
   Windows.UI.Xaml.Media.Imaging.WriteableBitmap img,
   System.int x,
   System.int y
)

パラメータ

img
新しい XLPictureShape に格納されている画像。
x
セルに対する新しい図形の水平位置(ツイップ単位)。
y
セルに対する新しい図形の垂直位置(ツイップ単位)。
使用例
下のコードはセルに画像を追加します。画像は元のサイズでレンダリングされ、 セルの左上隅から 30 ツイップのインデントが設定されます。
// シートとセルを取得します
XLSheet sheet = c1ExcelBook1.Sheets[0];
XLCell  cell  = sheet[row, col];

// XLPictureShape を作成します
XLPictureShape pic = new XLPictureShape(image, 30, 30);

// XLPictureShape をセルに割り当てます
cell.Value = pic;
Requirements

Target Platforms: 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

参照

関連項目

XLPictureShape クラス
XLPictureShape メンバ
オーバーロード一覧

Send Feedback