Questions tagged [python-pptx]

python-pptx is a Python library for creating and updating PowerPoint (.pptx) files.

python-pptx is a Python library for creating and updating PowerPoint (.pptx) files.

Latest documentation

Available from pypi.

734 questions
0
votes
1 answer

Add a image in table cell using python-pptx

I am using the python-pptx library to create a table in pptx document. I want to add an image in the table cell, but I haven't found such option to do so. I am adding cell using following code: table.cell(0, 1).text = 'cell text' How we can add an…
Navdeep Singh
  • 21
  • 1
  • 5
0
votes
0 answers

Python pptx link to Excel file - how is it saved? Is it possible to update it?

I have created a PowerPoint presentation which has an Excel range pasted as a link in it. This is done through copying a range in Excel, then in PowerPoint paste special and paste link. When the underlying excel range changes, I can update the link…
Money_Badger
  • 537
  • 1
  • 5
  • 24
0
votes
2 answers

Flexibly assign chart bar color according to value - python-pptx

Similar questions have been asked, but I still can't get it to work despite multiple tries. Python PPTX Bar Chart negative values , Color Specific Bar Chart Differently in Python PPTX Here is a simple example: from pptx import Presentation from…
Ludo
  • 2,307
  • 2
  • 27
  • 58
0
votes
0 answers

Copying a bullet in Python-pptx

I have a powerpoint slide with a table. In the final column I have created a bulleted item which I'd like to copy to fit an arbitrary list of text. How can I copy the first paragraph (with the bullet) to additional paragraphs. Copying the paragraph…
Tahnoon Pasha
  • 5,848
  • 14
  • 49
  • 75
0
votes
0 answers

Accessing a Slide with index in a presentation using Python.pptx

I am trying to create thousands of powerpoint presentations using Powerpoint VBA. Few days back I have learned python is the better tool to solve my issues which VBA cannot solve. So I am learning python.pptx to create those presentation and I am…
Gowtham
  • 131
  • 2
  • 12
0
votes
1 answer

I am trying to add placeholders to my slide using python pptx. But the place holders always end up in the top left of the slide

I am trying to add placeholders to my slide using python pptx. But the place holders always end up in the top left of the slide and comes up as size 0. I think this may be something to do with the placeholder not being defined in the layout? Is it…
user4029
  • 1
  • 4
0
votes
1 answer

Work on a defined slide with pptx python

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…
Mistapopo
  • 433
  • 3
  • 16
0
votes
1 answer

What is a list semanitcs in python?

In context of the following para : prs.slide_layouts is the collection of slide layouts contained in the presentation and has list semantics, at least for item access which is about all you can do with that collection at the moment.
Sushant
  • 160
  • 2
  • 10
0
votes
1 answer

How to edit the line style of a python pptx chart?

From the pptx documentation (http://python-pptx.readthedocs.io/en/latest/user/charts.html), the code to create an XY chart is: chart_data = XyChartData() series_1 = chart_data.add_series('Model 1') series_1.add_data_point(0.7,…
Steve Schulist
  • 931
  • 1
  • 11
  • 18
0
votes
1 answer

Unable to transform Presentation object from python-pptx library to upload to MS Graph API service endpoint

Context I have a python script that uses the openpyxl and python-pptx libraries to generate Workbooks and PowerPoints respectively. These files need to be uploaded via the Microsoft Graph API as an octet-stream directly from virtual…
Bryton Beesley
  • 167
  • 2
  • 12
0
votes
3 answers

How can I combine two presentations (pptx) into one master presentation?

I'm part of a project team that created PPTX presentations to present to clients. After creating all of the files, we need to add additional slides to each presentation. All of the new slides will be the same across the each presentation. What is…
Brad Lide
  • 3
  • 1
  • 2
0
votes
1 answer

Issues importing python-pptx on Linux (Ubuntu 17)

I am trying to import the python pptx library in a python programm. I installed it using pip before, which gave me the following output: Collecting python-pptx Downloading python-pptx-0.6.6.tar.gz (8.4MB) 100% |████████████████████████████████|…
C. Dautermann
  • 109
  • 1
  • 10
0
votes
1 answer

How do you set the color of a DOUGHNUT slice with Python PPTX?

I have a simple DOUGHNUT chart with two slices. The default color is red and blue. I'd like to change the color to a lighter red and green. This is setting both slices to green #Doughnut doughnutchart_data = ChartData() doughnutchart_data.categories…
Mattman85208
  • 1,858
  • 2
  • 29
  • 51
0
votes
1 answer

Python pptx picture placeholder rotation makes picture vanish in PowerPoint (not in LibreOffice)

I want to insert pictures in a Picture Placeholder. Previously I get EXIF information to rotate if needed. This is my code: placeholder = slide.placeholder[N] photo.open() ph_picture = placeholder.insert_picture(photo) if exif['Orientation'] ==…
danieltellez
  • 206
  • 1
  • 11
0
votes
1 answer

Find height of table after creating & populating it in python-pptx

I am working with a table and would like to query its final height after it has been populated with values. This way I will be able to adjust its position on the slide (graphicframe.top) according to how large it is. I add the table with these…
R-Peys
  • 123
  • 1
  • 9