0

I'm currently working on a way to generate Powerpoint presentation from Excel file. So, I decided to use Python as there is python-pptx which allows to work on .pptx files. I have to use a standard file on which I will add some shapes and texts but just whithin the first slide.

I've read python-pptx documentation but I didn't find a way to work on a defined slide (the first slide of my standard file). I found just a way to add a slide and work on it.

Can someone explain how to do it ?

If you don't understand my problem, tell me I will try to rephrase it.

Thanks

N.B : I'm French, on the web I didn't find a French documentation so I had to search English documentation. It's possible that I didn't understand something about my problem when I read it. Sorry, if you find it easily. I'm still working my English :D

Mistapopo
  • 433
  • 3
  • 16

1 Answers1

2

Is this what you are looking for?

prs = Presentation('existing-prs-file.pptx')
first_slide = prs.slides[0]
# do something with the content of the slides
prs.save('new-file-name.pptx')

btw I have just copied it from the docs.

ahed87
  • 1,240
  • 10
  • 10
  • Thank you very much. I have tried to use .get(i) but it doesn't work. Sorry, I didn't see it... Thank you. – Mistapopo Dec 15 '17 at 09:54