Sep-08-2017, 04:43 AM
I want to insert photos in an excel table. From:
http://openpyxl.readthedocs.io/en/latest...g-an-image
I get:
So I tried in the interactive shell:
Obviously the attribute '.add_image(image, 'cell') is deprecated.
Does anyone know what it looks like now? I could switch to xwlt but then I've got to find out how that works. I know the important parts of openpyxl already now.
http://openpyxl.readthedocs.io/en/latest...g-an-image
I get:
Quote:from openpyxl.drawing.image import Image
ws.add_image(img, 'A1')
So I tried in the interactive shell:
Quote:>>>from openpyxl.drawing.image import Image
>>> imXl.add_image(image, 'A2')
Traceback (most recent call last):
File "<pyshell#79>", line 1, in <module>
imXl.add_image(image, 'A2')
AttributeError: 'Workbook' object has no attribute 'add_image'
Obviously the attribute '.add_image(image, 'cell') is deprecated.
Does anyone know what it looks like now? I could switch to xwlt but then I've got to find out how that works. I know the important parts of openpyxl already now.