question

Upvotes
Accepted
1 0 0 0

Datastream for Office (DFO) Excel Add-In Connection Status

Hello, We are currently using DataStream DFO Excel Add-In and wish to automate some of the data capture via a Python Script that first Opens Excel that has DFO Add-In installed and then pushes the DSGRID Formula into a Cell with the required parameters.

What I would like to know is if there is a call that can be made to DFO within this context that will allow me to determine the Connection LogIn Status and login if necessary.

Thanks in advance

datastream-apidsws-apidatastream-for-office
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
446 2 2 2

Hi

There is a VBA command to display if Eikon/DFO is online

Private Sub CommandButton5_Click()

Set nObj = Application.COMAddIns("PowerlinkCOMAddIn.COMAddIn").Object.sharedObject

MsgBox ("Connected :" & nObj.GetApplicationOnlineStatus())

End Sub

Regards

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1 0 0 0

Thanks Paul.

I will give that go and see if calling the COM object from python works.

cheers

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1 0 0 0

Hi. I have made some progress with this but am still either missing some piece of fundamental knowledge or I am on the wrong trail altogether.

I am able to 'connect' to the Excel Application Object and see that COMAddIns is populated with (in my case) 4 AddIns. One of which is "DFOAddInExcel2016"

PYTHON snippet so far is

xlApp = win32com.client.gencache.EnsureDispatch("Excel.Application")
xlApp.Visible = 1
for addin in self.xlApp.COMAddIns:
    print(addin.description)

Resulting in

Microsoft Power View for Excel
DFOAddInExcel2016
Microsoft Power Map for Excel
Datastream Charting Addin

But I don;t see the PowerlinkCOMAddIn.COMAddIn object and therefoe any attempt to access properties or methods on this fail with an index error.

I have tried your suggestion of calling GetApplicationOnlineStatus() against the DFO AddIn I can see but this reports an error as I don't believe that is an function of this particular DFO AddIn.

print(xlApp.COMAddIns("DFOAddInExcel2016").GetApplicationOnlineStatus())

Traceback (most recent call last):
  File "C:\tgm\bin\anaconda3\envs\tgm-py368\lib\site-packages\IPython\core\interactiveshell.py", line 3296, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-70-19e551b05640>", line 1, in <module>
    print(xlApp.COMAddIns("DFOAddInExcel2016").GetApplicationOnlineStatus())
  File "C:\tgm\bin\anaconda3\envs\tgm-py368\lib\site-packages\win32com\client\dynamic.py", line 527, in __getattr__
    raise AttributeError("%s.%s" % (self._username_, attr))
AttributeError: <unknown>.GetApplicationOnlineStatus

Any ideas on how I can establish what all of the available functions and properties maybe for the "DFOAddInExcel2016" COM Object? I know that 'description' is available but beyond that I am in the dark.

thanks in advance

BTW. Google shows zero results for "DFOAddInExcel2016"

cheers

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
39.2k 75 11 27

@bruce.gibbins
The answer from @paul.bacon assumed you were using Datastream for Office (DFO) Excel Add-In as part of an Eikon terminal. Since you don't have "Thomson Reuters Eikon - Microsoft Office" listed under Excel's Application.COMAddIns collection, it doesn't look like you have Eikon installed on this machine. What Refinitiv product do you subscribe to that includes Datastream for Office (DFO) Excel Add-In?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1 0 0 0

Thanks. That will explain it (I think). We have a legacy (pre-Eikon) subscription going back some years. From what I can gather it may be a subscription to specific datasets and these seem to come packaged with the DFO Excel Add-In which is installed separately as an Add-In (ie. there is no Terminal install)

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

In this case I suggest you open a support case with Refinitiv Helpdesk. I'm not sure there's anyone on this community who's deeply familiar with the internal architecture of those legacy add-ins.

Upvotes
1 0 0 0

Thanks Alex. Appreciate it

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea