diag_11b.py
634 Bytes
import openpyxl
path = r"F:/data-report/data-process/outputs/store_effect_summary/门店店效人效汇总表_2026-08.xlsx"
wb = openpyxl.load_workbook(path, data_only=True)
ws = wb['总看板']
# find 1.1产值 / 1.1预算 labels
targets = ['1.1产值','1.1预算','2.1产值','2.3产值','全国经营总产值']
for row in ws.iter_rows():
for c in row:
if c.value in targets:
# value is 2 cells to the right (label, value) per layout A=label B=value
col = c.column
valcell = ws.cell(row=c.row, column=col+1)
print(f"row{c.row} col{col} {c.value!r} -> {valcell.value!r}")