import sys, io
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
import openpyxl
PKG = r'D:\01.프로젝트\DB수집\작업파일\_제출패키지_2026-06-03\프리랜서1\충청남도_부여군.xlsx'
wb = openpyxl.load_workbook(PKG); ws = wb.active

def merged_at(r,c):
    for m in ws.merged_cells.ranges:
        if m.min_row<=r<=m.max_row and m.min_col<=c<=m.max_col:
            return f'[{m.min_row}:{m.max_row}]'
    return ''

for r in range(508, 573):
    h = ws.row_dimensions[r].height
    vals=[]
    for c,lab in [(2,'B'),(4,'D'),(5,'E'),(6,'F'),(7,'G'),(8,'H'),(11,'K'),(12,'L'),(13,'M'),(14,'N'),(15,'O')]:
        v=ws.cell(r,c).value
        if v not in (None,''):
            vals.append(f'{lab}={v!r}{merged_at(r,c)}')
    print(f'r{r} h={h} | ' + ' '.join(vals))
