From be6b7a15a3e9c51f6a1e5753814e8ad0ebb7597d Mon Sep 17 00:00:00 2001 From: Seppe De Loore Date: Sat, 10 Oct 2026 17:54:45 +0200 Subject: [PATCH] Set column widths for Firma..Firma 3 to 2.5 cm Kolommen B-I (Firma, Van, Tot, Pauze, Uren, Galaxy, Auro 3D, Firma 3) op 2,5 cm (13.5 Excel-breedte-eenheden) per maandtabblad. --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index 2ff82d8..12753b6 100644 --- a/main.py +++ b/main.py @@ -16,6 +16,8 @@ FIRM_COLS = ["G", "H", "I"] MONTH_ABBR = ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"] STYLE_COLS = "ABCDEFGHIJ" +WIDTH_COLS = "BCDEFGHI" # Firma Van Tot Pauze Uren Galaxy Auro 3D Firma 3 +COL_WIDTH = round(2.5 * 96 / 2.54 / 7, 2) # 2,5 cm in Excel-karakterbreedte def build_month(ws, year, month, day_styles, total_styles, protection): @@ -66,6 +68,8 @@ def build_month(ws, year, month, day_styles, total_styles, protection): dv.add(f"B{first}:B{last}") ws.protection = copy(protection) + for col in WIDTH_COLS: + ws.column_dimensions[col].width = COL_WIDTH ws.print_area = f"A1:J{hours}" ws.print_title_rows = "1:6"