DB_JOB/작업파일/_스크립트/_verify_buyeo_final.py
hehihoho3 df16c98366 백업: DB수집 전체 스냅샷 (공공기관2 정리 전)
공공기관2 작업 중. _temp 몽타주(재생성가능)는 제외.

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

19 lines
1.2 KiB
Python

import sys, io
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
import openpyxl, importlib.util
spec = importlib.util.spec_from_file_location('chk', r'D:\01.프로젝트\DB수집\작업파일\광역_사이트맵\_검수체크.py')
chk = importlib.util.module_from_spec(spec); spec.loader.exec_module(chk)
PKG = r'D:\01.프로젝트\DB수집\작업파일\_제출패키지_2026-06-03\프리랜서1\충청남도_부여군.xlsx'
BK = PKG.replace('.xlsx','_backup_테두리보정전.xlsx')
n, issues = chk.inspect(PKG)
print(f'검수: {n}행 -> {"PASS" if not issues else "FAIL "+str(issues)}')
# values & heights identical to pre-border backup (only borders should differ)
a = openpyxl.load_workbook(PKG).active
b = openpyxl.load_workbook(BK).active
vdiff = sum(1 for r in range(1,a.max_row+1) for c in range(1,28) if a.cell(r,c).value!=b.cell(r,c).value)
hdiff = sum(1 for r in range(1,a.max_row+1) if a.row_dimensions[r].height!=b.row_dimensions[r].height)
print(f'값 변화: {vdiff} 높이 변화: {hdiff} (둘 다 0이어야 정상)')
print(f'max_row {a.max_row} (전부 height=15: {all(a.row_dimensions[r].height==15 for r in range(1,a.max_row+1))})')