![](/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?
[英]Table height of insert_table in python-pptx
我使用 python-pptx 並在占位符的位置創建了一個帶有insert_table
的表。
ph = slide.placeholders[11]
table = ph.insert_table(rows=6,cols=1).table
是否可以使表格適合占位符的高度? 或者,是否可以為這張桌子定義一個整體的桌子高度?
我知道您可以在使用add_table
時定義表格高度。 但是, insert_table
也有解決方案嗎?
簡短的回答是你自己。
您希望將占位符垂直大小除以行數並將每行高度設置為該行數。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.