让我们假设 a=0,b=1....,z=25,aa=26,...等等。
如何在python中形成一个列表来查找任何给定字母表的索引假设ey?
book = xlrd.open_workbook(input("Enter name of the excel file "))
table_list=list(book.sheet_names())
print("the sheets in the excel file are :")
for name in table_list:
print(name)
first_sheet = book.sheet_by_index(table_list.index(input("Enter sheet name ")))
arrayofvalues = first_sheet.col_values(152,2,239)
我需要在 col_val 函数中使用获得的值。
还有其他方法吗?