我正在尝试使用xlwings从excel调用python代码。工作簿的名称是" wingsTest"。如果我的被叫代码中的第一行是wb = Workbook("wingsTest")
,它运行正常但是wb = Workbook.caller()
时出现以下错误:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\rbn\Documents\PythonScripts\apnlookupXL.py", line 74, in main
wb = Workbook.caller()
File "F:\Anaconda3\lib\site-packages\xlwings\main.py", line 182, in caller
xl_workbook = xlplatform.get_xl_workbook_from_xl(fullname)
File "F:\Anaconda3\lib\site-packages\xlwings\_xlwindows.py", line 429, in get_xl_workbook_from_xl
if not is_file_open(unicode(fullname)):
NameError: name 'unicode' is not defined
寻求任何帮助。