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.
This commit is contained in:
@@ -16,6 +16,8 @@ FIRM_COLS = ["G", "H", "I"]
|
|||||||
MONTH_ABBR = ["jan", "feb", "mrt", "apr", "mei", "jun",
|
MONTH_ABBR = ["jan", "feb", "mrt", "apr", "mei", "jun",
|
||||||
"jul", "aug", "sep", "okt", "nov", "dec"]
|
"jul", "aug", "sep", "okt", "nov", "dec"]
|
||||||
STYLE_COLS = "ABCDEFGHIJ"
|
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):
|
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}")
|
dv.add(f"B{first}:B{last}")
|
||||||
|
|
||||||
ws.protection = copy(protection)
|
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_area = f"A1:J{hours}"
|
||||||
ws.print_title_rows = "1:6"
|
ws.print_title_rows = "1:6"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user