@ -27,6 +27,8 @@ idx = 1
for inline_shape in doc.InlineShapes:
if inline_shape.Type == win32com.client.constants.wdInlineShapeChart: # 检查是否为内嵌图表
shape = doc.InlineShapes(idx)
# 获取图表的标题
print(shape.Chart.ChartTitle.Text)
sheet = shape.Chart.ChartData.Workbook.Worksheets("Sheet1")
# 行数
row_size = sheet.UsedRange.rows.Count