Using version 2.1.4 I could generate an Excel file with an image attached and anchored to a cell using this code:
img = openpyxl.drawing.Image(imagePath) ws.add_image(img) img.anchor(ws['F3'], anchortype='oneCell') img.drawing.left = 25 img.drawing.top = 20
Using version 2.2.2 (latest version in PyPi) this leads to an Excel validity error. Upon workbook repair, Excel mentions it has stripped off the print settings.
If I comment the add_image call, the file is OK (but without the image of course).
For each use case I attached an example file, so you can see for yourself.