Featured post

Fixed Income Trading: New venues

A simple question came up recently in a conversation – how many new Fixed Income trading venues are there?  I could not think of anywhere th...

Tuesday, 7 April 2015

Excel RTD Server VBA code wrapper: gotcha!

This is a nice and simple technical tip rather than one of my War and Peace tendency blog posts.  The Microsoft Excel RTD function is one we have covered here before many times.

From a spreadsheet the syntax for addressing the RTD Server is:

=RTD("alignmentsystems.node2rtd2",,510)

If you want to create a VBA wrapper around this then the code can look like:

Function Wrapper()
Wrapper = Application.WorksheetFunction.RTD("alignmentsystems.node2rtd2", "my_computer_name", "510")
End Function

Replace my_computer_name with the name of your PC where the RTD Server is running locally. 

If you don't include my_computer_name in your code then the VBA wrapper will not work.

If you want to replicate this, download the Excel Worksheet code from github.  You can also download the C# code to create the Excel RTD Server from github


For further reading, see:
Excel RTD Server implementation in C#......Part 1
Excel RTD Server implementation in C#......Part 2
Excel industrialisation...Part Eight "Enumerating RTD Servers"

No comments:

Post a Comment