是否可以垂直对齐文本,使其在表格单元格中垂直居中?
答案 0 :(得分:0)
Tablename.Rows(0).Cells(0).VerticalAlignment = VerticalAlignment.Center
答案 1 :(得分:0)
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