Table insert_table 在 python-pptx 中的高度

Table height of insert_table in python-pptx

我使用 python-pptx 并在占位符的位置创建了一个 table 和 insert_table

ph = slide.placeholders[11]
table = ph.insert_table(rows=6,cols=1).table

是否可以让 table 适合占位符的高度? 或者,是否可以为此 table?

定义总体 table 高度

我知道您可以在使用 add_table 时定义 table 高度。但是,是否也有 insert_table 的解决方案?

简短的回答是你要靠自己。

您希望将占位符的垂直大小除以行数并将每行高度设置为该值。