xlrd错误时打开具有命名范围的Excel文件

尝试在Python 3.2.4上使用xlrd 0.9.1打开工作簿时,出现以下错误消息。 我testing过,看看有什么可能导致这个问题,我已经解决了电子表格命名范围。

Traceback (most recent call last): File "C:\Users\mandroid\Desktop\xltest.py", line 5, in <module> book = open_workbook(pth) File "C:\Python32\lib\site-packages\xlrd\__init__.py", line 416, in open_workbook ragged_rows=ragged_rows, File "C:\Python32\lib\site-packages\xlrd\xlsx.py", line 725, in open_workbook_2007_xml x12book.process_stream(zflo, 'Workbook') File "C:\Python32\lib\site-packages\xlrd\xlsx.py", line 251, in process_stream meth(self, elem) File "C:\Python32\lib\site-packages\xlrd\xlsx.py", line 346, in do_defined_names self.do_defined_name(child) File "C:\Python32\lib\site-packages\xlrd\xlsx.py", line 335, in do_defined_name nobj.formula_text = cooked_text(self, elem) File "C:\Python32\lib\site-packages\xlrd\xlsx.py", line 130, in cooked_text return unicode(unescape(t)) TypeError: <lambda>() takes exactly 2 arguments (1 given) 

从我读到的,它看起来像xlrd命名范围function,所以我不知道是什么可能造成这一点。 任何帮助表示赞赏。

这是xlrd 0.9.1中的一个错误: https : //github.com/python-excel/xlrd/issues/47

您可以尝试0.9.0,等待0.9.2,或者应用John Machin在报告中提出的修正。