공공기관2 작업 중. _temp 몽타주(재생성가능)는 제외. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
17 lines
656 B
Python
17 lines
656 B
Python
import sys, io
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
import openpyxl
|
|
P = r'D:\01.프로젝트\DB수집\작업파일\광역_사이트맵\충청남도\10.아산시\충청남도_아산시.xlsx'
|
|
wb = openpyxl.load_workbook(P)
|
|
ws = wb.active
|
|
print('dims', ws.dimensions, 'max_row', ws.max_row, 'max_col', ws.max_column)
|
|
print('--- header rows 1-2 ---')
|
|
for r in (1, 2):
|
|
for c in ws[r]:
|
|
if c.value is not None:
|
|
print(r, c.coordinate, repr(c.value))
|
|
print('--- merged (first 30) ---')
|
|
for i, m in enumerate(sorted(ws.merged_cells.ranges, key=lambda x: (x.min_row, x.min_col))):
|
|
if i < 30:
|
|
print(m)
|