#获取excel用例数据 def get_case_data(): case_path = os.path.join(os.path.dirname(__file__), r'files\apiCase.xls') book = xlrd.open_workbook(case_path) sheet = book.sheet_by_name('sheet1名字') # excel标签名 case = [] for i in range(0, sheet.nrows): if sheet.row_values(i)[0] == 'C端登录' and sheet.row_values(i)[3]=='YES': case.append(sheet.row_values(i)) return case
标签:case,sheet,获取,excel,用例,path,row From: https://www.cnblogs.com/may18/p/17700139.html