表中的字体大小是逐次运行设置的。因此,您可以在添加文本时这样做,或者之后可以执行以下操作:
from pptx.util import Ptdef iter_cells(table): for row in table.rows: for cell in row.cells: yield cellfor cell in iter_cells(table): for paragraph in cell.text_frame.paragraphs: for run in paragraph.runs: run.font.size = Pt(24)



