- 공공기관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>
12 lines
543 B
Python
12 lines
543 B
Python
# -*- coding: utf-8 -*-
|
|
import openpyxl, io
|
|
wb=openpyxl.load_workbook("한국지역난방공사.xlsx"); ws=wb.active
|
|
out=io.open("_siteq_out.txt","w",encoding="utf-8")
|
|
for r in range(3, ws.max_row+1):
|
|
L=ws.cell(r,12).value; K=ws.cell(r,11).value or ""
|
|
if (L and str(L).strip()=="사이트") or "/cyb/" in str(K):
|
|
d=[ws.cell(r,c).value for c in range(4,11)]
|
|
path=" > ".join(str(x).strip() for x in d if x not in(None,""))
|
|
out.write(f"r{r} B{ws.cell(r,2).value}\tL={L}\t{path}\t{K}\n")
|
|
out.close(); print("done")
|