标签:pytho excel sheet rownum dex print file elf test
import xlrd
class ReadExcel:
def __init__(self,filename,sheetname):
self.workbook = xlrd.open_workbook(filename)
self.sheetname = self.workbook.sheet_by_name(sheetname)
def read_cell(self,rownum, colnum):
return self.sheetname.cell(rownum,colnum).value
print(ReadExcel(‘test.xlsx‘,‘Sheet1‘).read_cell(1,1))
标签:pytho excel sheet rownum dex print file elf test
原文地址:https://www.cnblogs.com/mqhuang/p/13236838.html