python-pptx Questions

9

Solved

Question in Short: How can I use the find and replace option (Ctrl+H) using the Python-pptx module? Example Code: from pptx import Presentation nameOfFile = "NewPowerPoint.pptx" #Replace this wi...
Dehumidify asked 20/6, 2016 at 14:15

7

Solved

How can I copy a slide? I created a template slide and I need to copy it and edit shapes of each copy separately. Or how I can add my template slide to presentation.slide_layouts?
Exploratory asked 14/6, 2018 at 22:10

3

Solved

I need to add an image to a pptx slide, and want to locate it in the center of the slide, without having to calculate the size and alignment manually, I found a question about doing so with text:...
Yorgo asked 20/10, 2016 at 9:5

5

Solved

I've started putting together some code to take Pandas data and put it into a PowerPoint slide. The template I'm using defaults to Medium Style 2 - Accent 1 which would be fine as changing the font...
Visionary asked 5/3, 2017 at 16:23

3

Solved

I am trying to get the title of each slide of a powerpoint file using Python. I am using Presentation package in Python but I couldn't find anything that specifies the titles. I have this code that...
Rumelia asked 26/11, 2016 at 13:15

2

I've just stumbled across this, it looks extremely useful. I found some examples for manipulating slides and the like, my particular use case involves basically replacing a bunch of images within a...
Nantucket asked 4/7, 2021 at 19:39

5

Solved

I am working on python-pptx package. For my code I need to extract all the images that are present inside the presentation file. Can anybody help me through this ? Thanks in advance for help. my ...
Saladin asked 25/9, 2018 at 6:11

4

Solved

I have developed a small code in Python to generate a PPTX file. But I would like also to generate a picture in PNG or JPEG of the slide. from pptx import Presentation from pptx.util import Inches ...
Earthstar asked 15/5, 2020 at 9:20

3

I'd like to update the text within a textbox without changing the formatting. In other words, I'd like to keep the original formatting of the original text while changing that text I can update th...
Stalinist asked 21/7, 2017 at 21:35

2

Solved

This is very simple, but I cannot find the actual method anywhere in the documentation or otherwise. I am using the python-pptx module and all I need to do is delete a single placeholder item, an...
Feet asked 20/9, 2016 at 20:37

2

I am trying to extract table from a PPT using python-pptx, however, the I am not sure how do I that using shape.table. from pptx import Presentation prs = Presentation(path_to_presentation) # text...
Codi asked 29/1, 2019 at 10:37

2

Solved

I am trying to replace the table headers in powerpoint using python-pptx using the code below slides = [slide for slide in ip_ppt.slides] shapes = [] for slide in slides: for shape in slide.shapes...
Phyto asked 2/8, 2022 at 5:39

1

Solved

I have two PPTs (File1.pptx and File2.pptx) in which I have the below 2 lines XX NOV 2021, Time: xx:xx – xx:xx hrs (90mins) FY21/22 / FY22/23 I wish to replace like below a) NOV 2021 as NOV 2022. ...
Sitra asked 3/8, 2022 at 9:31

1

Solved

I already referred these posts here here, here and here. Please don't mark it as a duplicate. I have a chart embedded inside the ppt like below I wish to replace the axis headers from FY2021 HC to...
Tonsil asked 12/7, 2022 at 8:48

3

Solved

Question in short: Is it possible to align text to the center in Python-pptx? Since I'm using Python-pptx, I have been able to automate quite a lot of things and I really enjoy using it! However, ...
Amur asked 13/8, 2016 at 17:10

1

I try to start python-pptx, but I have Error: AttributeError: module 'collections' has no attribute 'Container' in File "...\lib\site-packages\pptx_init_.py", line 14 Use Python 3.10, p...
Thadthaddaus asked 6/10, 2021 at 14:59

1

Solved

I use the PPTX library to automate the creation of a deck of slides on a weekly basis. It was working really well until the last update of the library. As you can see below, I keep getting the foll...
Anaya asked 29/11, 2021 at 18:11

3

I'm trying to get the image from clipboard and I want to add that image in python-pptx . I don't want to save the image in the Disk. I have tried this: from pptx import Presentation from PIL impo...
Cyprus asked 12/9, 2016 at 12:49

2

Solved

I am new with python-pptx. But I am familiar with its basic working. I have searched a lot but I could not find a way to change a particular text by another text in all slides. That text may be in ...
Spinning asked 21/6, 2018 at 7:32

1

Can I edit the Header & Footer of an existing Presentation using python-pptx? The values I want to set are as shown in the attached image. Thanks.
Diapophysis asked 29/8, 2016 at 12:25

4

I am using the python-pptx library for pptx manipulation. I want to add a bullet list in the pptx document. I am using the following snippet to add list item: p = text_frame.add_paragraph() run ...
Dogmatism asked 20/3, 2018 at 12:22

2

I would like to change the font size of the title and of the body of my pptx-presentation. I tried to set it via title_shape.font = Pt(15) and body_shape.font = Pt(10), which does not work. Here i...
Bethina asked 31/1, 2019 at 15:38

2

I open a pptx file and want to change the chart dataset. How can I do that? prs = Presentation("mypresentation.pptx") chart = prs.slides[0].shapes[2].chart I get the chart as above from the slid...
Chelicera asked 4/3, 2019 at 21:21

2

Solved

I am creating a table using pptx python Reference: https://python-pptx.readthedocs.io/en/latest/dev/analysis/tbl-table.html When I create a table, I get the default table style and I would like t...
Trippet asked 24/5, 2020 at 6:21

3

Solved

My PowerPoint slide has a number of group shapes in which there are child text shapes. Earlier I was using this code, but it doesn't handle Group shapes. for eachfile in files: prs = Presentation...
Herwin asked 6/8, 2018 at 6:22

© 2022 - 2024 — McMap. All rights reserved.