DB_JOB/작업파일/공공기관2/10.한국지역난방공사/_applyM.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

22 lines
912 B
Python

import openpyxl,json,io,copy
from openpyxl.styles import PatternFill
BLUE=PatternFill(fgColor='FFBDD7EE',fill_type='solid')
rep=json.load(io.open('_boardM_all.json',encoding='utf-8'))
wb=openpyxl.load_workbook('한국지역난방공사.xlsx'); ws=wb.active
applied=[]; skipped=[]
for x in rep:
r=x['r']; cur=x['curM']; new=x['newM']; tag=x['tag']
if r==176: skipped.append((r,'임직원검색 directory est keep')); continue
if not isinstance(new,int) or new<=0 or 'norows' in tag:
if str(cur)!=str(new): skipped.append((r,tag,x['label']))
continue
if str(cur)==str(new): continue
ws.cell(r,13).value=new
ws.cell(r,13).fill=copy.copy(BLUE)
applied.append((r,cur,new,x['label']))
wb.save('한국지역난방공사.xlsx')
print('applied',len(applied))
for a in applied: print(' ',a)
print('skipped(JS/empty - left as is):',len(skipped))
for s in skipped: print(' ',s)