问题
I am trying to automate a ppt using pptx-python library. I'm using a template. There are few charts in some of the slides. And charts have text boxes in it. I tried looping over the shapes to get the shape_id of those text boxes but I couldn't find the shape_id.
And when I tried to drag the text box out of the chart area it didn't come out. It seems the text box is part of the chart area. There are two areas chart area and plot area and text boxes are inside the chart area and plot area contains the bars of bar chart.
Original
[
When I shrink downed the plot area, the text boxes are still at there original position
[
Can anyone tell me how to locate those text boxes using python-pptx? I want to replace those XXX with my own text.
Text boxes are the part of the plot area.
Note: If this is already asked then please put up the link of that post in the comments. Thank you.
Added the XML Schema of the ppt you can see the text I want to replace. Can anyone tell me how to traverse through it using python-pptx?
来源:https://stackoverflow.com/questions/61383528/how-to-read-text-boxes-inside-the-chart-area-python-pptx