Picture#

class Picture(impl=None)#

Pictureオブジェクトは pictures コレクションのメンバーです:

>>> import xlwings as xw
>>> sht = xw.books['Book1'].sheets[0]
>>> sht.pictures[0]  # or sht.charts['PictureName']
<Picture 'Picture 1' in <Sheet [Book1]Sheet1>>

バージョン 0.9.0 で変更.

property api#

使用しているエンジンのネイティブ オブジェクト(pywin32 オブジェクトまたは appscript オブジェクト)を返します。

バージョン 0.9.0 で追加.

delete()#

Picureを削除します。

バージョン 0.5.0 で追加.

property height#

Pictureの高さを表すポイント単位の数値を取得または設定します。

バージョン 0.5.0 で追加.

property left#

Pictureの水平位置を表すポイント単位の数値を取得または設定します。

バージョン 0.5.0 で追加.

property lock_aspect_ratio#

True will keep the original proportion, False will allow you to change height and width independently of each other (read/write).

バージョン 0.24.0 で追加.

property name#

Picrtureの名前を取得または設定します。

バージョン 0.5.0 で追加.

property parent#

Pictureの親オブジェクトを返します。

バージョン 0.9.0 で追加.

property top#

Pictureの垂直位置を表すポイント単位の数値を取得または設定します。

バージョン 0.5.0 で追加.

update(image, format=None, export_options=None)#

既存のPictureを新しいPictureで置き換えます。既存のPictureのアトリビュートは新しいPictureに引き継がれます。

Arguments#

imagestr or path-like object or matplotlib.figure.Figure

ファイルパスまたはMatplotlibのFigureオブジェクト。

formatstr, default None

See under Pictures.add()

export_optionsdict, default None

See under Pictures.add()

バージョン 0.5.0 で追加.

property width#

Pictureの幅を表すポイント単位の数値を取得または設定します。

バージョン 0.5.0 で追加.