问题
Using excel2img package to take scrrenshot of excel.
Recently upgraded MS office version to 2016 from 2013.
Pyhton's package "excel2img" worked with MSoffice 2013 but observing mentioned error for MS Office version 2016,not sure about the issue.Kindly guide.Thanks!
import excel2img
excel2img.export_img("test.xlsx", "status.png", "Sheet1", None)
File "C:\Python37\lib\site-packages\excel2img\excel2img.py", line 113, in export_img for shape in rng.parent.Shapes: pass File "C:\Python37\lib\site-packages\win32com\client__init__.py", line 473, in getattr raise AttributeError("'%s' object has no attribute '%s'" % (repr(self), attr)) AttributeError: '' object has no attribute 'parent'
回答1:
@May0021 Even I was searching for the same, but looks like excel2img doesnot support 2016 as per the below data. Excel2img requirement
来源:https://stackoverflow.com/questions/57173575/pythons-excel2img-package-not-working-with-ms-office-2016