无法使用openpyxl加载工作簿

时间:2018-09-05 21:55:06

标签: python excel openpyxl

这是我用来加载工作簿的代码: import openpyxl from sys import argv genreUri = argv[1] genre = openpyxl.load_workbook(genreUri)

上面的代码抛出此错误。

 Traceback (most recent call last):
  File "/Users/Chaudhary/projects/genre/backend/utils/openpyxl/cell.py", line 26, in <module>
    genre = openpyxl.load_workbook(genreUri)
  File "/usr/local/lib/python2.7/site-packages/openpyxl/reader/excel.py", line 251, in load_workbook
    ws_parser.parse()
  File "/usr/local/lib/python2.7/site-packages/openpyxl/reader/worksheet.py", line 130, in parse
    dispatcher[tag_name](element)
  File "/usr/local/lib/python2.7/site-packages/openpyxl/reader/worksheet.py", line 304, in parse_sheet_protection
    self.ws.protection = SheetProtection.from_tree(element)
  File "/usr/local/lib/python2.7/site-packages/openpyxl/descriptors/serialisable.py", line 100, in from_tree
    return cls(**attrib)
TypeError: __init__() got an unexpected keyword argument 'undefined'

0 个答案:

没有答案