diff --git a/50 Dekurz pro reporter.py b/50 Dekurz pro reporter.py index 59ef4fc..1819fdf 100644 --- a/50 Dekurz pro reporter.py +++ b/50 Dekurz pro reporter.py @@ -142,6 +142,18 @@ with pd.ExcelWriter(xlsx_path, engine="openpyxl") as writer: ) elif isinstance(cell.value, str) and "\n" in cell.value: cell.alignment = Alignment(wrap_text=True, vertical="top") + # ----- Force wrap_text for the entire DEKURS column ----- + for col in ws.columns: + header = col[0].value + if header and "DEKURS" in str(header).upper(): + for cell in col[1:]: # skip header row + # preserve existing alignment if possible + align = cell.alignment + cell.alignment = Alignment( + horizontal=align.horizontal or "left", + vertical="top", + wrap_text=True + ) # ----- Column widths ----- for col in ws.columns: