python 如何获取excel activex 控件值?求大拿解答

需求背景:通过python 实现excel 表单数据提交数据库。
代码如下:
代码运行没问题,但是没有找到直接通过shape相关方法直接获取到控件值
我的解答思路和尝试过的方法 :想通过python直接获取控件值,不想通过linkcell再进一步提取相关值
def read_activex():
    global xlsm_path, xlsm_sheet
    xlsm_path = r'D:\TEST.xlsm'
    xlsm_sheet = 'pat_history'
    exl = win32com.client.gencache.EnsureDispatch('Excel.Application')
    exl.EnableEvents = False
    exl.DisplayAlerts = False
    wb = exl.Workbooks.Open(xlsm_path)
    ws = wb.Worksheets(xlsm_sheet)
    # print(ws)
    # print('Shape count: %s' % len(ws.Shapes))
    for shape in ws.Shapes:
        print('ActiveX Name:', str(shape.Name), 'Type:', shape.Type, 'Text"', shape.AlternativeText)

你试试下面代码

import win32com.client
xls = win32com.client.Dispatch("Excel.Application")
xls.Workbooks.Open("宏代码所在excel全路径")
xls.Application.Run("宏名称")
xls.Application.Quit()