![](/img/trans.png)
[英]Python-PPTX: Why does the row height in a table expand if any of the cells in the row have empty text?
[英]pptx python set row height in a table
left = Inches(0.2)
top = Inches(1.0)
width = Inches(15.0)
height = Inches(3)
column_width= [Inches(0.2),Inches(0.4),Inches(2),Inches(0.43),Inches(0.43)]
我想創建一個表格,它的第一行(標題)的高度僅為英寸(1.0),其他行#高度為英寸(3)。 我只能為所有行設置行高,但不能自定義它。
有可能做這樣的事情嗎?
每行都有一個可寫的.height
屬性。 雖然您無法在.add_table()
調用中設置它,但您可以在此后立即或稍后方便的任何時間進行設置。
row = table.rows[i]
row.height = Inches(3)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.