#你好,伙计们,我不能用excel表格加载或工作,有人能帮忙吗?
import openpyxl as xl
wb = xl.load_workbook('exel.xlsx')
sheet = wb['oo']
cell = sheet.cell(1, 1)
print(cell.value)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'cell' is not defined#这是我第一次在堆叠溢出上发帖,很抱歉,如果我的问题一团糟,而且没有组织起来
发布于 2021-11-17 07:01:00
确保在您的环境中安装了openpyxl:
pip install openpyxl或者如果你在unix上:
pip3 install openpyxl然后再试一次。也请检查这是您唯一的错误消息,还是您只看到最后一条消息。
https://stackoverflow.com/questions/69999991
复制相似问题