Use pip install openpyxl first
Every simple example
import openpyxl
# 打开excel文件,获取工作簿对象
wb = openpyxl.load_workbook('OP_SVC_INST_SampleUT23.xlsx')
# 从表单中获取单元格的内容
ws = wb['SQL Results'] # 当前活跃的表单
row_range = ws[1:36]
for row in row_range:
for cell in row:
print (str(cell.value) + ',')