MiKi_16
MiKi_16
采纳率0%
2019-02-19 20:44 阅读 1.3k

openpyxl修改excel出错

Traceback (most recent call last):
File "D:\project\op.py", line 8, in
wb.save('e:/2.xlsx')
File "D:\python\lib\site-packages\openpyxl\workbook\workbook.py", line 396, in save
save_workbook(self, filename)
File "D:\python\lib\site-packages\openpyxl\writer\excel.py", line 294, in save_workbook
writer.save()
File "D:\python\lib\site-packages\openpyxl\writer\excel.py", line 276, in save
self.write_data()
File "D:\python\lib\site-packages\openpyxl\writer\excel.py", line 76, in write_data
self._write_worksheets()
File "D:\python\lib\site-packages\openpyxl\writer\excel.py", line 226, in _write_worksheets
self._write_comment(ws)
File "D:\python\lib\site-packages\openpyxl\writer\excel.py", line 180, in _write_comment
vml = fromstring(self.workbook.vba_archive.read(ws.legacy_drawing))
AttributeError: 'NoneType' object has no attribute 'read'

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

相关推荐