python-pptx icon indicating copy to clipboard operation
python-pptx copied to clipboard

A way to exclude excel columns in the series.

Open evanwalter opened this issue 10 months ago • 2 comments

I would like to generate a chart whose series are a subset of the excel data behind it. All the data would be available in the excel data behind the chart, but the chart would not show all the columns.

evanwalter avatar Jan 31 '25 02:01 evanwalter

Not possible in this library. Python-pptx overwrites the entire spreadsheet behind a chart. You cannot target a specific cell range or hide and show specific columns. You can sponsor this development by messaging the Author directly.

mszbot avatar Feb 17 '25 15:02 mszbot

A couple of potential approaches - but neither is directly in python-pptx:

  1. Create a temporary sheet from the permanent.
  2. Extract the data from the permanent sheet and drive python-pptx charting directly.

MartinPacker avatar Feb 17 '25 15:02 MartinPacker