我已经安装了 xlutils 并正在尝试以下代码:
from xlrd import open_workbook
input_file = open_workbook('DataTestFile.xlsx')
for s in input_file.sheets():
print('Sheet:',s.name)
for row in range(s.nrows):
values = []
for col in range(s.ncols):
values.append(s.cell(row,col).value)
print(','.join(values))
print()
(根据此处找到的教程书)
我收到一条错误消息,指出未找到许可模块:
Traceback (most recent call last):
File "C:\Users\xxxxxxx\workspace_python\xxxxxxx\TestPack\test_file_excel.py", line 7, in <module>
from xlrd import open_workbook
File "C:\Python34\lib\site-packages\xlrd\__init__.py", line 9, in <module>
import licences
ImportError: No module named 'licences'
但是,我可以确认文件 licences.py 与上面引用的文件 _ init _.py 位于同一文件夹中:
怎么不被认出来?