DB_JOB/작업파일/공공기관2/10.한국지역난방공사/_rowh.py
hehihoho3 b0acd1e705 백업: 셀병합 정상화(D~J)+KDHC 옵션2/행높이17, 오늘(06-21) 제출 17곳 검수·압축
- 공공기관2/3 작업본 + 오늘 제출 17곳 D~J 카테고리 셀병합 정상화
- 한국지역난방공사 옵션2(고아셀 F98 수정)+전행 높이17
- 제출_프리랜서2_2026-06-21.zip 생성(17개 xlsx, 2,468행)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 13:21:26 +09:00

24 lines
745 B
Python

# -*- coding: utf-8 -*-
import openpyxl, os, shutil, time
f="한국지역난방공사.xlsx"
mt0=os.path.getmtime(f)
shutil.copy2(f,"한국지역난방공사_backup_행높이17전.xlsx")
wb=openpyxl.load_workbook(f)
ws=wb.active
ws.sheet_format.defaultRowHeight=17
ws.sheet_format.customHeight=True
mx=ws.max_row
for r in range(1,mx+1):
ws.row_dimensions[r].height=17
# mtime guard before save
if abs(os.path.getmtime(f)-mt0)>0.5:
raise SystemExit("ABORT: file changed by another process")
wb.save(f)
# verify
wb2=openpyxl.load_workbook(f)
ws2=wb2.active
hs=set()
for r in range(1,ws2.max_row+1):
hs.add(ws2.row_dimensions[r].height)
print("max_row",ws2.max_row,"distinct heights set:",hs,"default",ws2.sheet_format.defaultRowHeight)