import openpyxl
#1.找到对应的文件,2找到sheet3找到行和列4读取我们需要的值
wenjian = openpyxl.load_workbook("L1.xlsx")#先要找到需要用到的文件内容,该文件需要放在当前路径下面
sheet1 = wenjian['Sheet1']#一个文件会存在多个sheet需要定位到 用哪个sheet
content = sheet1.cell(row=1,column=1).value#按照行列寻找需要用到的数据,将该数据打印出来
print(content)
python读取excel中的内容,方便后续用到接口请求中
最新推荐文章于 2024-06-22 19:07:40 发布