import xlrd
from xlutils.copy import copy #导入俩库
fname='C:/Users/pc/Desktop/XXXXXXXX.XLSX'
filename=xlrd.open_workbook(fname)
sheet=filename.sheet_by_name("表名")
nrows = sheet.nrows #一共多少行
i=2
while i<=nrows:
if i%2==0:
cell_value = sheet.cell_value(i,1) #行和列
i+=2
print(cell_value)
excel的ip分类脚本
最新推荐文章于 2021-09-27 09:40:56 发布