Picture
- class Picture
The picture object is a member of the
picturescollection:>>> # Assumes an existing workbook object named book. >>> sheet = book.sheets[0] >>> sheet.pictures[0] # or sheet.charts['PictureName'] <Picture 'Picture 1' in Sheet1>
バージョン 0.9.0 で変更.
- property api: Any
Returns the native object (
pywin32orappscriptobj) of the engine being used.Added in version 0.9.0.
- property lock_aspect_ratio: bool
Truewill keep the original proportion,Falsewill allow you to change height and width independently of each other (read/write).Added in version 0.24.0.
- property parent: Sheet
Pictureの親オブジェクトを返します。
Added in version 0.9.0.
- update(image, format=None, export_options=None)
既存のPictureを新しいPictureで置き換えます。既存のPictureのアトリビュートは新しいPictureに引き継がれます。
- パラメータ:
image (str | PathLike[str] | Any) -- ファイルパスまたはMatplotlibのFigureオブジェクト。
format (str | None) -- See under
Pictures.add()export_options (dict[str, Any] | None) -- See under
Pictures.add()
- 戻り値の型:
Added in version 0.5.0.