从表格和文本框中导入数据的代码:
pres = Presentation(ppt_file)
for slide in pres.slides:
for shape in slide.shapes:
if(shape.has_text_frame):
for paragraph in shape.text_frame.paragraphs:
for run in paragraph.runs:
print run.text
我有一张这样的幻灯片:
输出为: 运行文本
正在从左框架或大框读取文本,但不是从右两个框架读取文本。