Border diagonals

50 views
Skip to first unread message

Rameez ali

unread,
Sep 9, 2021, 9:25:21 PM9/9/21
to openpyxl-users
Hi Charlie,

I'm trying to mark a cell with diagonal border, but my diagonal borders don't show at all
here is my code 

dashed_border = Border(
diagonal=Side(border_style="thick", color=RED),
diagonal_direction=1,
diagonalUp = True
)
cell = sheet["A1"]
cell.value = "test"

cell.border = dashed_border

what does diagonalDirection, diagonalUp and diagonalDown means here ?

Charlie Clark

unread,
Sep 10, 2021, 4:53:21 AM9/10/21
to openpyxl-users
The best thing to do is actually try things out in Excel and look at the resulting XML.

Charlie

--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Waldlehne 23
Düsseldorf
D- 40489
Tel: +49-203-3925-0390
Mobile: +49-178-782-6226

Rameez ali

unread,
Sep 10, 2021, 11:08:42 AM9/10/21
to openpyxl-users
Thanks, Charlie.
Reply all
Reply to author
Forward
0 new messages