from pptx import Presentation
prs = Presentation('demo.pptx')
text_runs = []
for slide in prs.slides:
for shape in slide.shapes:
if shape.has_text_frame:
for para in shape.text_frame.paragraphs:
for run in para.runs:
text_runs.append(run.text)
print(text_runs)
반응형
'RPA > Python' 카테고리의 다른 글
[python-pptx] 도형 객체 삽입 (0) | 2021.05.08 |
---|---|
[python-pptx] 슬라이드에 이미지 삽입 (0) | 2021.05.08 |
[python-pptx] 텍스트 박스에 글자 입력 (0) | 2021.05.07 |
[python-pptx] slide_layouts[] 및 placeholders[] 속성 (0) | 2021.05.07 |
[python-pptx] 환경 설정 및 pptx 파일 생성 (0) | 2021.05.07 |