Blocking RTD to connect for old spreadsheets.

Add-in Express™ Support Service
That's what is more important than anything else

Blocking RTD to connect for old spreadsheets.
Query regarding the approach we can block RTD to connect for already exisiting data sheets. 
Ashim Mishra




Posts: 25
Joined: 2016-03-01
In my application i have lot of datapoints(UDF) which basically call RTD to fetch the data value. It works fine but it's quite sluggish. For almost 750 odd datapoints it takes 4 mins to load the entire sheet.

Now I am thinking to load the old sheet(Already contain datapoints) in a different way in which it should not invloves creating the topics again. It should ideally open the last instance of the sheet. With this way i can save the time we pull the data from db.

I would like to know the approach by which i can persist the old value in excel sheet, without reconnecting the topics again.

I have tried to use ADXRTDTopic.UseStoredValue = true; but this doesn't work.
Posted 11 Oct, 2018 00:02:14 Top
Andrei Smolin


Add-in Express team


Posts: 16223
Joined: 2006-05-11
Hello Ashim,

I don't understand your description. Could you please provide more details? What do you mean by "should not invloves creating the topics again"?

Ashim Mishra writes:
I have tried to use ADXRTDTopic.UseStoredValue = true; but this doesn't work.


If ADXRTDTopic.UseStoredValue = True, the user sees the following sequence: the sheet get opened; it displays the the last values returned by your RTD server; after a while, the values start changing. In other words, ADXRTDTopic.UseStoredValue = True allows your RTD server to continue showing the last stored value while the RTD topic gets connected and updated.

If you set UseStoredValue to false (default) the caller cell displays ADXRTDTopic.DefaultValue (default is an empty string) when the topic gets connected until the next update.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 11 Oct, 2018 05:13:01 Top
Ashim Mishra




Posts: 25
Joined: 2016-03-01
Thanks Andrei for replying. In our Excel Addin we maintain lot of UDF which contains some parameters like revision. In case that revision is set to dynamic value such as "=Today()" we fetch those datapoints from server. This works in most of the cases, but lately few of our clients have started complaining above the performance issue. Now we are planning to bring some functionality like opening the old sheet, which will basically opens the datapoint that got updated when last time user has opened the sheet.
We are capitalizing on the fact that RTD maintains the topic parameter, which will also be having last revision value.

We are investigating few approaches in which we want to open the sheet as soon as user opens it(without involving Topic creation) and in the background we will fetch the data from DB. Once background thread completes its job, we will update the topic with new set of parameters and value. We would like to know any other approach you may be familiar with to handle this kind of business scenario.
Posted 14 Oct, 2018 16:17:14 Top
Andrei Smolin


Add-in Express team


Posts: 16223
Joined: 2006-05-11
Hello Ashim,

I assume you have Interval=0 on your RTD server module. In this case, it is you who defines when to update topics.

If a sheet contains RTD calls, then the topics will be created automatically and all of them will receive the Connect event. At this moment, you can check the parameters and decide whether you will update topics or not.

If you decide to update the topics, you can start retrieving data and call UpdateTopics() when data arrives. If you do not update topics, don't retrieve data and don't call UpdateTopics().

Let's consider the second variant: your RTD server does not start retrieving data when the ADRTDTopic.Connect event occurs. In this case, you can retrieve data using a COM add-in; you can start this process after a delay. When data are retrieved you can use the fact that your RTD server and COM add-in are loaded in the same AppDomain: just call a method defined in the RTD server.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 15 Oct, 2018 05:26:31 Top