Skip to content

Excel Range.CopyPicture not supported? #582

Description

@EMIjess

Per Microsoft, Range has a method CopyPicture() - https://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.range.copypicture.aspx

When testing in xlwings, using:

import xlwings as xw # for Excel interactivity
wb = xw.Book("test.xlsx")
mysheet = wb.sheets('Sheet1')
thisrange = mysheet.range("a1:b3")
pic = thisrange.CopyPicture('xlPicture', 'xlScreen')

I get this error

python testing.py
Traceback (most recent call last):
  File "testing.py", line 37, in <module>
    pic = thisrange.CopyPicture('xlPicture', 'xlScreen')
AttributeError: 'Range' object has no attribute 'CopyPicture'

Perhaps there is another solution for taking a screenshot of a worksheet or range within xlwings, but I did not see it in the docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions