1

Using the pptx module,

 tbl.cell(3,3).text

is a writable, but not a readable attribute. Is there a way to just read the text in a PowerPoint table? I'm trying to avoid COM and pptx is a great module, but lacks this particular feature.

Thanks!

reckoner
  • 2,861
  • 3
  • 33
  • 43

1 Answers1

3

At present, you'll need to go a level deeper to get text out of a cell using python-pptx. The cell.text 'getter' is on the roadmap.

Something like this should get it done:

cell = tbl.cell(3, 3)
paragraphs = cell.textframe.paragraphs
for paragraph in paragraphs:
    for run in paragraph.runs:
        print run.text

Let me know if you need more to go on.

scanny
  • 26,423
  • 5
  • 54
  • 80