공공기관2 작업 중. _temp 몽타주(재생성가능)는 제외. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
24 lines
1.0 KiB
Python
24 lines
1.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
import sys
|
|
sys.stdout.reconfigure(encoding='utf-8')
|
|
import openpyxl
|
|
wb = openpyxl.load_workbook('전북특별자치도_무주군.xlsx'); ws = wb.active
|
|
print('max_row', ws.max_row)
|
|
def show(rng):
|
|
for r in rng:
|
|
vals = [ws.cell(r, c).value for c in range(2, 12)] # B..K
|
|
k = ws.cell(r,11)
|
|
link = k.hyperlink.target if k.hyperlink else None
|
|
print(r, vals, '| Klink:', link)
|
|
for region in [range(153,160), range(180,186)]:
|
|
print('=====')
|
|
show(region)
|
|
print('===== B values continuity check (first/last) =====')
|
|
content = [r for r in range(3, ws.max_row+1)
|
|
if ws.cell(r,2).value not in (None,'') or ws.cell(r,11).value not in (None,'')
|
|
or any(ws.cell(r,c).value not in (None,'') for c in range(4,11))]
|
|
print('content rows count:', len(content), 'first', content[0], 'last', content[-1])
|
|
# show rows that are NOT content between 3..max to see truly empty rows
|
|
noncontent = [r for r in range(3, ws.max_row+1) if r not in content]
|
|
print('non-content rows in range:', noncontent)
|