from pptx import Presentation
prs=Presentation('名字.pptx')
for slide in prs.slides: # 讀取每一頁幻燈片
for shape in slide.shapes: #獲取每一頁的內容
if shape.has_text_frame: #判斷是否有文本框架
text_frame=shape.text_frame
for paragraph in text_frame.paragraphs:
print(paragraph.text) #列印每一段的內容
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/139435.html
標籤:Python
上一篇:提取pdf檔案表格
