Python xlrd操作表格 1、安装xlrd库 pip install xlrd==1.2.0 2、读取工作簿单元格 def Read_Bk_Ip(filename): data = xlrd.open_workbook(filename) sheet1 = data.sheets()[0] nrows = sheet1.nrows ncols= sheet1.ncols for i in nrows: for j in ncols: data=sheet1.cell(i,j).value print(data)