I am struggling to use Refinitiv COMAddin programmatically on excel using python win32com (I have also tried with xlwings with no success).
If I open excel manually an excel file the "Refinitiv" tab works perfectly fine but it appears to crash when I open excel indirectly from python: this creates issues when I am trying to insert refinitiv api formulas in cells.
I have looked at this other post https://community.developers.refinitiv.com/questions/29464/launch-excel-com-add-in-with-python-win32com.html but it does not work for me since the following command prompts an error:
xlapp.COMAddIns("PowerlinkCOMAddIn.COMAddIn").Connect = True
The code snippet I am using is the following
import win32com.client as win32 xlapp = win32.gencache.EnsureDispatch('Excel.Application') xlapp.RegisterXLL(addin_path) xlapp.Visible=False wb = xlapp.Workbooks.Open(xlsPath,None,False) sht = wb.Sheets('Sheet1') sht.Cells(1,1).Value = formula_string
formula_string: string containing the Refinitiv formula xlsPath: path of the excel file I am opening addin_path: path of the Refinitiv addin, which in my case is contained in ...\AppData\Local\Refinitiv\Refinitiv for Office\1.19.98\Office_x64\refinitiv-shim.dll
Can anyone help me with this problem?