diff --git a/BaiHu/Tools/DocxTuBiaoRead.py b/BaiHu/Tools/DocxTuBiaoRead.py index c1f5d4e5..bf945062 100644 --- a/BaiHu/Tools/DocxTuBiaoRead.py +++ b/BaiHu/Tools/DocxTuBiaoRead.py @@ -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