优化部分代码

This commit is contained in:
leileili126@163.com
2017-06-09 21:17:12 +08:00
parent ab6e58b264
commit 8e91f84fd4
15 changed files with 26 additions and 1758 deletions

32
Public/get_excel.py Normal file
View File

@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
# @Time : 2017/6/4 20:35
# @Author : lileilei
# @Site :
# @File : get_excel.py
# @Software: PyCharm
import xlrd,xlwt
import unittest,sys
from xlutils.copy import copy
from Interface.feng import reques
def datacel():
filepath='.\\Data\\Data.xlsx'
file=xlrd.open_workbook(filepath)
me=file.sheets()[0]
nrows=me.nrows
listid=[]
listkey=[]
listconeent=[]
listurl=[]
listfangshi=[]
listqiwang=[]
listrelut=[]
listname=[]
for i in range(1,nrows):
listid.append(me.cell(i,0).value)
listkey.append(me.cell(i,2).value)
listconeent.append(me.cell(i,3).value)
listurl.append(me.cell(i,4).value)
listname.append(me.cell(i,1).value)
listfangshi.append((me.cell(i,5).value))
listqiwang.append((me.cell(i,6).value))
return listid,listkey,listconeent,listurl,listfangshi,listqiwang,listname