import xlrd
import xlwt
import os
path='.\\'
data = xlrd.open_workbook('name.xls')
table = data.sheet_by_name(data.sheet_names()[0])
for i in range(0,len(table.col_values(0))):
name = table.col_values(0)[i]
for file in os.listdir(path):
#判断是否是文件
if os.path.isfile(os.path.join(path,file))==True:
if table.col_values(0)[i] in file:
state = True
break
else:
state = False
if state == False:
print(name)
python名单筛选(名单位于excel,筛选未提交文件的人)
最新推荐文章于 2024-05-10 07:15:07 发布