0
votes

I'd like to use the python-pptx library to read the embedded data sheet behind a chart inside a presentation. I've seen the documentation to replace chart data, but I can't figure out how to read data. I've already referred to Read chart data from existing chart using python-pptx but this is not what I'm looking for.

1

1 Answers

0
votes

chart.part.chart_workbook.xlsx_part.blob will give you the Excel binary (bytes).

From there you can save that as a file or read it as an in-memory file using io.BytesIO(), or whatever suits your purposes.

You could, for example, open it with openpyxl and read and write the Excel "file".