私はpython xlrd http://scienceoss.com/read-excel-files-from-python/を使用してExcelシートからデータを読み取ります
私の質問は、Excelシートで最初のセルが「従業員名」の行を読んだかどうかです
そして、最初のセルが「従業員名」であるという名前の別の行があります
最初のセルに「従業員名」が含まれる最後の行から始まる最後の列をどのように読み取ることができますか.前を無視する
wb = xlrd.open_workbook(file,encoding_override="cp1252")
wb.sheet_names()
sh = wb.sheet_by_index(0)
num_of_rows = sh.nrows
num_of_cols = sh.ncols
valid_xl_format = 0
invalid_xl_format = 0
if(num_of_rows != 0):
for i in range(num_of_rows):
questions_dict = {}
for j in range(num_of_cols):
xl_data=sh.cell(i,j).value
if ((xl_data == "Employee name")):
# Regardless of how many "Employee name" found in rows first cell,Read only the last "Employee name"