python pptx change entire table font size

∥☆過路亽.° 提交于 2019-12-04 12:18:04

Font size in a table is set on a run-by-run basis. So you might do so as you're adding text, or you could do something like this afterward:

from pptx.util import Pt

def iter_cells(table):
    for row in table.rows:
        for cell in row.cells:
            yield cell

for cell in iter_cells(table):
    for paragraph in cell.text_frame.paragraphs:
        for run in paragraph.runs:
            run.font.size = Pt(24)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!