【发布时间】:2021-03-19 05:22:20
【问题描述】:
使用excel2img包获取excel截图。
最近从 2013 年将 MS office 版本升级到 2016 年。
Pyhton 的包“excel2img”与 MSoffice 2013 一起使用,但观察到 MS Office 版本 2016 的上述错误,不确定问题。请指导。谢谢!
导入excel2img
excel2img.export_img("test.xlsx", "status.png", "Sheet1", None)
文件“C:\Python37\lib\site-packages\excel2img\excel2img.py”,第 113 行,在 export_img 对于 rng.parent.Shapes 中的形状:通过 getattr 中的文件“C:\Python37\lib\site-packages\win32com\client__init__.py”,第 473 行 raise AttributeError("'%s' 对象没有属性 '%s'" % (repr(self), attr)) AttributeError: '' 对象没有属性 'parent'
【问题讨论】: