From 08a8910343774389e73d641f733146030a22e33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=B5=B7?= <10402852@qq.com> Date: Fri, 8 Nov 2024 20:33:07 +0800 Subject: [PATCH] 'commit' --- BaiHu/Tools/DocxTuBiaoRead.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BaiHu/Tools/DocxTuBiaoRead.py b/BaiHu/Tools/DocxTuBiaoRead.py index 0be6d3e8..c430fa69 100644 --- a/BaiHu/Tools/DocxTuBiaoRead.py +++ b/BaiHu/Tools/DocxTuBiaoRead.py @@ -31,7 +31,8 @@ for inline_shape in doc.InlineShapes: # print(pic1.Chart.ChartData.Workbook.FullName) print(pic1.Chart.ChartStyle) print(pic1.Chart.ChartTitle.Text) - print(pic1.Chart.ChartData.Workbook.Worksheets(1)) + sheet = pic1.Chart.ChartData.Workbook.Worksheets("Sheet1") + print(sheet.Range("A2").Text) idx = idx + 1 # 这里可以对图表进行操作,比如获取图表的类型、数据等 doc.Close()