Configure template target cells and add skip-errors mode
This commit is contained in:
1 parent
418d8336f5
commit
5f3a820641
5 files changed
+31
-17
No files matched your search
@@ -319,12 +319,13 @@ def validate_business_rules(
|
||||
|
||||
if template_path.exists():
|
||||
template_wb = load_workbook(template_path, data_only=True)
|
||||
if len(template_wb.sheetnames) != 1:
|
||||
configured_sheet = config["sheets"].get("template_source", "")
|
||||
if configured_sheet not in template_wb.sheetnames:
|
||||
issues.append(
|
||||
ValidationIssue(
|
||||
code="TEMPLATE_SHEET_COUNT",
|
||||
code="TEMPLATE_SHEET_MISSING",
|
||||
message=(
|
||||
f"Template workbook must contain exactly one sheet, found {len(template_wb.sheetnames)}."
|
||||
f"Configured template sheet '{configured_sheet}' not found in template workbook."
|
||||
),
|
||||
severity="error",
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user