import openpyxl
wb = openpyxl.load_workbook('医生资料.xlsx')
# 第二步:选取表单
sh = wb['实体']
# 第三步:读取数据
# 参数 row:行 column:列
ce = sh.cell(row = 1,column = 1) # 读取第一行,第一列的数据
print(ce.value)
# 按行读取数据 list(sh.rows)
for cases in list(sh.rows):
print(cases[0].value)
# 关闭工作薄
wb.close()
Python processing table prints the data in the table by column
Guess you like
Origin blog.csdn.net/xfb1989/article/details/103990070
Recommended
Ranking