From 391214ccb30262a9e90a9d2b11a5cc9dba423f41 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 14:06:24 +0000 Subject: [PATCH 1/3] Initial plan From 73b214a0946bc2e2b2dbe37ee77a36ee5c082ff4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 14:11:14 +0000 Subject: [PATCH 2/3] Fix Excel formula syntax error in Checks sheet Co-authored-by: Kenearos <86194771+Kenearos@users.noreply.github.com> --- src/build_template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build_template.py b/src/build_template.py index e7c28db..7127147 100644 --- a/src/build_template.py +++ b/src/build_template.py @@ -261,7 +261,7 @@ def _populate_checks(ws): for row in range(2, 52): date_ref = f"A{row}" ws[f"B{row}"] = f'=WENN({date_ref}="";"";SUMMENPRODUKT((tblPlan[Datum]={date_ref})*(tblPlan[Anteil])))' - ws[f"C{row}"] = f'=WENN({date_ref}="";""WENN(ABS(B{row}-1)<=0,0001;"OK";"FEHLER"))' + ws[f"C{row}"] = f'=WENN({date_ref}="";"";WENN(ABS(B{row}-1)<=0,0001;"OK";"FEHLER"))' ws.column_dimensions["A"].width = 14 ws.column_dimensions["B"].width = 16 From abf5e9bbfbc510e74f6282d0b4a7e24700e2f52c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 14:14:25 +0000 Subject: [PATCH 3/3] Add CHANGELOG documenting the formula syntax fix Co-authored-by: Kenearos <86194771+Kenearos@users.noreply.github.com> --- CHANGELOG.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..64d6513 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,45 @@ +# Changelog + +## 2025-11-14 - Fix Excel Formula Syntax Error + +### Issue +Fixed a syntax error in the Checks sheet that would cause Excel formula errors. + +### Details +The nested WENN (IF) formula in the Checks sheet Status column was missing a semicolon between the empty string result and the second WENN function. + +**File:** `src/build_template.py`, line 264 + +**Before:** +```excel +=WENN(A2="";""WENN(ABS(B2-1)<=0,0001;"OK";"FEHLER")) +``` + +**After:** +```excel +=WENN(A2="";"";WENN(ABS(B2-1)<=0,0001;"OK";"FEHLER")) +``` + +### Impact +This fix ensures that the Checks sheet Status column works correctly to validate that daily shift totals sum to 1.0, displaying "OK" or "FEHLER" as appropriate. + +### Testing +- Template rebuilt successfully +- November 2025 file generated without errors +- All formulas verified syntactically correct +- No security issues found (CodeQL scan: 0 alerts) + +### How to Use +To generate a corrected November 2025 file: + +```bash +# 1. Rebuild the template with the fix +python src/build_template.py + +# 2. Generate November 2025 +python src/fill_plan_dates.py 2025 11 + +# 3. Open output/Dienstplan_2025_11_NRW.xlsx in Excel +``` + +The file will now work correctly with all formulas calculating as expected according to the Variante 2 (streng) rules specified in SPECIFICATION.md.