2017-06-04 20:52:17 +08:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
# @Time : 2017/6/4 20:35
|
|
|
|
|
# @Author : lileilei
|
|
|
|
|
# @File : get_excel.py
|
|
|
|
|
# @Software: PyCharm
|
|
|
|
|
import xlrd,xlwt
|
|
|
|
|
import unittest,sys
|
|
|
|
|
from xlutils.copy import copy
|
2017-06-17 16:22:59 +08:00
|
|
|
from Interface.test_requests import reques
|
2017-06-04 20:52:17 +08:00
|
|
|
def datacel():
|
2017-06-17 16:22:59 +08:00
|
|
|
filepath='.\\test_Data\\test_Data.xlsx'
|
2017-06-04 20:52:17 +08:00
|
|
|
file=xlrd.open_workbook(filepath)
|
|
|
|
|
me=file.sheets()[0]
|
|
|
|
|
nrows=me.nrows
|
2017-06-05 21:50:25 +08:00
|
|
|
listid=[]
|
2017-06-04 20:52:17 +08:00
|
|
|
listkey=[]
|
|
|
|
|
listconeent=[]
|
|
|
|
|
listurl=[]
|
|
|
|
|
listfangshi=[]
|
|
|
|
|
listqiwang=[]
|
2017-06-05 21:50:25 +08:00
|
|
|
listrelut=[]
|
2017-06-06 11:05:50 +08:00
|
|
|
listname=[]
|
2017-06-04 20:52:17 +08:00
|
|
|
for i in range(1,nrows):
|
2017-06-06 11:05:50 +08:00
|
|
|
listid.append(me.cell(i,0).value)
|
2017-06-04 20:52:17 +08:00
|
|
|
listkey.append(me.cell(i,2).value)
|
|
|
|
|
listconeent.append(me.cell(i,3).value)
|
|
|
|
|
listurl.append(me.cell(i,4).value)
|
2017-06-06 11:05:50 +08:00
|
|
|
listname.append(me.cell(i,1).value)
|
2017-06-04 20:52:17 +08:00
|
|
|
listfangshi.append((me.cell(i,5).value))
|
|
|
|
|
listqiwang.append((me.cell(i,6).value))
|
2017-06-06 11:05:50 +08:00
|
|
|
return listid,listkey,listconeent,listurl,listfangshi,listqiwang,listname
|