I have to open multiple presentation using a loop, get some data and close it.
I cannot seem to find a way to close the ppt file in python pptx without saving/overwriting it.
I use the following to open the ppt file
pptfile = addressList[xyz]
prs = Presentation(pptfile)
slides = prs.slides
but I cannot find a way to close to presentation(prs) without saving in order to load the next ppt
I have a temporary work around which is as follows
prs.save(r"C:\Users\prashant.kumar\temp.pptx")
Since prs.save
closes the ppt it works fine but I want a better way to close the ppt without creating a temp ppt file.
Is there an attribute of Presentation
for python-pptx
which I can use to close the ppt without saving?