How to change font size of text within a table created by Python-pptx

∥☆過路亽.° 提交于 2019-12-01 08:01:05

A _Cell object doesn't directly contain paragraphs. However, it does include a TextFrame object on .text_frame which contains the paragraphs. So if you just use:

cell.text_frame.paragraphs[0]

..you should get what you expect. Note that it's .paragraphs, not .paragraph.

The API documentation for _Cell is here: http://python-pptx.readthedocs.io/en/latest/api/table.html#cell-objects

and generally provides all the details needed to resolve the finer points like this one.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!