📦 Initialize Geulbeot structure and merge Prompts & test projects
This commit is contained in:
15
02. Prompts/문서생성/codedomain/합계_기준_Python_v01.py
Normal file
15
02. Prompts/문서생성/codedomain/합계_기준_Python_v01.py
Normal file
@@ -0,0 +1,15 @@
|
||||
def find_unit_from_sum_cell(ws, sum_row, max_col):
|
||||
"""
|
||||
합계 셀 기준 단위 탐색
|
||||
- 오른쪽 열 우선, 위쪽 방향 탐색
|
||||
- 대분류 경계 무시 (합계 기준으로만 판단)
|
||||
"""
|
||||
# 오른쪽 열부터 왼쪽으로
|
||||
for c in range(max_col, 0, -1):
|
||||
# 합계 행부터 위쪽으로
|
||||
for r in range(sum_row, 0, -1):
|
||||
cell_val = ws.cell(row=r, column=c).value
|
||||
if is_likely_unit(cell_val):
|
||||
return str(cell_val).strip()
|
||||
|
||||
return ""
|
||||
Reference in New Issue
Block a user