Use RTD Server to push data to web service from Excel

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

Use RTD Server to push data to web service from Excel
Is it possible/sensible to read worksheet contents direct from the RTD server? 
David Jones




Posts: 41
Joined: 2012-10-15
Hi there

I'm implementing a web service that users will access from Excel. Users will be able to pull data from and push data to the service using Excel.

The obvious choice for the PULL functionality is an RTD server - all good. I have developed an RTD solution for pushing data from Excel to the service and it works reasonably well but I'm not completely happy with it. I'm coming to the conclusion that RTD might not be the best approach for push.

One of the problems I face is the restriction on the amount of data that can be pushed through the RTD interface. Each of the parameters String01 to String28 can be a maximum of 255 characters. My UDF wrapper currently takes the data the user is trying to publish, splits it into 255 character strings and pushes it through the RTD interface. The RTD server reconstructs it on the other side before sending it on to the service. This is a) cumbersome and b) means that my Topic is created and destroyed each time the data changes, which could be every few seconds.

An alternative approach would be to pass a reference to a range through the RTD server interface (e.g. Sheet1!A1:D10) instead of the data itself. The RTD server could then access the range directly and extract the data it needs to send on. As the parameters to the RTD server are constant (just the range reference) the topic doesn't change. Is this possible/advisable? Or do you think I should be looking at a different approach entirely?

Thanks very much

David
Posted 25 Oct, 2012 13:38:14 Top
Andrei Smolin


Add-in Express team


Posts: 16744
Joined: 2006-05-11
Hello David,

The RTD Server interfaces don't allow your RTD server to accept a reference to a range of cells. You can use the UDF itself, not the RTD server. Also, if your UDF is an XLL, you can invoke a public method from the RTDServerModule directly, not through the RTD Server interface; please check an example at http://www.add-in-express.com/creating-addins-blog/2010/03/24/addin-xll-rtd-one-assembly/.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 26 Oct, 2012 04:09:14 Top
David Jones




Posts: 41
Joined: 2012-10-15
Thanks very much, Andrei. The shared object approach is exactly what I need. Sometimes the solution to your problems is right under your nose!

David
Posted 29 Oct, 2012 05:00:18 Top