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.
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:
I get this error
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.