openpyxl - How to add an image to worksheet?
0
I have already read the documentation at https://media.readthedocs.org/pdf/openpyxl/latest/openpyxl.pdf, in order to understand how to add an image to a worksheet. And so, used the following code to write my test program: from openpyxl.drawing.image import Image as XLIMG from openpyxl.worksheet import Worksheet from openpyxl import Workbook wb = Workbook() ws = wb.active img = XLIMG('example.png') ws.add_image(img, 'A1') wb.save("test.xlsx") Actually, the code works, and reproduces an xlsx file. However when I open the file using LibreOffice Calc, I don't see any image object, but instead empty cell at 'A1'. I'm also pretty sure that the png file is neither empty, nor corrupt. Concerning the versions, I'm currently using OpenPyXL 2.5.11 and Libr...