2020
10-08
10-08
python读取excel进行遍历/xlrd模块操作
我就废话不多说了,大家还是直接看代码吧~#!/usr/bin/envpython#-*-coding:utf-8-*-importcsvimportxlrdimportxlwtdefhandler_excel(filename=r'/Users/zongyang.yu/horizon/ops_platform/assets/upload/1.xlsl'):#打开文件workbook=xlrd.open_workbook(filename)index=workbook.sheet_names()[0]sheet2=workbook.sheet_by_name(index)#遍历nrows=sheet2.nrowsforiinrange(nrows):print(...
继续阅读 >