具体来说,你想要这样的东西;
import openpyxl
# Load the Excel workbook
workbook = openpyxl.load_workbook(r"chart.xlsx")
# Access the sheet containing the chart
sheet = workbook['charts - APAC'] # Replace with your sheet name
# Iterate through all charts in the sheet
for chart in sheet._charts:
print(chart.title.text.rich.p[0].text[0].value)