You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

get_excel_new.py 594 B

2 years ago
1234567891011121314151617181920
  1. """
  2. @author: lileilei
  3. @file: get_excel_new.py
  4. @time: 2018/4/30 11:04
  5. """
  6. '''读取Excel'''
  7. import xlrd
  8. def datacel(filrpath):
  9. all_case = []
  10. file = xlrd.open_workbook(filrpath)
  11. me = file.sheets()[0]
  12. nrows = me.nrows
  13. for i in range(1, nrows):
  14. all_case.append({"id": me.cell(i, 0).value, 'key': me.cell(i, 2).value,
  15. 'coneent': me.cell(i, 3).value, 'url': me.cell(i, 4).value,
  16. 'name': me.cell(i, 1).value, 'fangshi': me.cell(i, 5).value,
  17. 'assert': me.cell(i, 6).value})
  18. return all_case

Introduction

生成接口测试报告

No topics

Contributors (2)