我是python新手,正在尝试从xlsx表导入
使用xldr模块,但当它达到100时出错
当我拨打高于[99]的号码时,我得到一个键错误
我现在无法读懂数字,因为它给出了一个'100':'100'而不是 100:100就像其他核弹手做的99:99一样
import xlrd
loc = ("c:/exel/loopline.xlsx")
workbook = xlrd.open_workbook(loc)
sheet = workbook.sheet_by_index(0)
sheet.cell_value(0,0)
lusnummer = {}
for i in range(3,140):
cell_value_id2 = sheet.cell(i,1).value
cell_value_lusnummer = sheet.cell(i,1).value
lusnummer[cell_value_id2] = cell_value_lusnummer
print(lusnummer)
输出如下所示:
, 99.0: 99.0, '100': '100',
我现在想知道我做错了什么
目前没有回答
相关问题 更多 >
编程相关推荐