공공기관2 작업 중. _temp 몽타주(재생성가능)는 제외. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
16 lines
789 B
Python
16 lines
789 B
Python
import openpyxl, sys
|
|
sys.stdout.reconfigure(encoding='utf-8')
|
|
wb=openpyxl.load_workbook(r'충청남도_서천군.xlsx'); ws=wb.active
|
|
# B and C for first/last data rows
|
|
for r in [3,4,5,15,16,17,328,329]:
|
|
print(f'R{r}', 'B=',repr(ws.cell(r,2).value), 'C=',repr(ws.cell(r,3).value))
|
|
# is C merged anywhere?
|
|
cmerges=[str(m) for m in ws.merged_cells.ranges if m.min_col<=3<=m.max_col]
|
|
print('C-merges:', cmerges[:10], '...total', len(cmerges))
|
|
bmerges=[str(m) for m in ws.merged_cells.ranges if m.min_col<=2<=m.max_col]
|
|
print('B-merges:', bmerges[:10],'total',len(bmerges))
|
|
# B sequence check
|
|
bvals=[ws.cell(r,2).value for r in range(3,ws.max_row+1)]
|
|
print('B first 10:', bvals[:10])
|
|
print('B all None?', all(v is None for v in bvals), 'non-none count', sum(v is not None for v in bvals))
|