"""Extract original worksheet layout for the in-app preview without saving the template.""" from pathlib import Path import json,warnings,openpyxl from openpyxl.utils import get_column_letter warnings.filterwarnings('ignore') root=Path(__file__).resolve().parent.parent;w=openpyxl.load_workbook(root/'교각수량산출.xlsx') layouts={};styles={} def color(c,fallback): if c is None:return fallback if c.type=='rgb':return '#'+c.rgb[-6:] if c.type=='indexed': from openpyxl.styles.colors import COLOR_INDEX return '#'+COLOR_INDEX[c.indexed][-6:] if c.indexed