Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python-docx, vertical alignment in cell

Is it possible to vertically align text so it is vertically centered in a table cell?

like image 569
girdeux Avatar asked Sep 17 '25 21:09

girdeux


1 Answers

from docx.enum.table import WD_ALIGN_VERTICAL

table = document.add_table(3, 3)
table.cell(0, 0).vertical_alignment = WD_ALIGN_VERTICAL.BOTTOM

https://python-docx.readthedocs.io/en/latest/api/enum/WdCellVerticalAlignment.html

like image 179
HuLu ViCa Avatar answered Sep 21 '25 04:09

HuLu ViCa