User Tools

  • Vistasource Document Library

Subscribe

You can subscribe to data with RTW using the RTW COM Server (rts) and the RTD function. The RTD function is an Excel function available in Microsoft® Excel 2002 or higher. The RTD function retrieves real-time data from any program that supports COM automation such as RTW. Please see the Microsoft® Excel Help for more information on COM automation.

RTW offers three menu options that facilitate building an RTD formula for subscribing to data.

These options are:

  • Quote Wizard – Steps through the process of building an RTD formula
  • Quote Table – Creates a table of RTD formulas referencing record and field names in a spreadsheet
  • Quick Quote – Provides an easy way to automatically build a RTD formula

To learn more about these options, click on the relevant engine link listed at the bottom of this topic.

RTSHARE users: See Requests for information on requesting RTSHARE data.

The generic syntax for Microsoft® Excel RTD is as follows:

=RTD(ProgID, server, topic1, [topic2], …)

When using RTW to subscribe to data, the RTD function uses the following arguments:

=RTD(ProgId, server, command, engine, servicename, recordname, fieldname1, […, fieldnameN])

The arguments have the following meaning:

ArgumentExplanation
ProgIDThe name of the RTW RTD Server, Vistasource.RtdServer.
Server Remains null.
Command“rt”, to indicate the subscribe command.
Data RangeThe cell or cell range containing the value(s) to publish.
EngineThe RTW engine that will do the subscribing,
e.g. vsRMDS (RMDS SFC), vsRMDS2 (RMDS RFA), axbloom (Bloomberg), vsnf (Netfeed), rthttp (WebData).
ServicenameThe name of the service to which you are subscribing.
For Bloomberg, this references the Record Type.
RecordnameThe name of the record to subscribe to.
Fieldname1The name of the first field, such as BID or ASK.
FieldnameNThe name of the last field.

Example of an RTD function for subscribing: The following formula subscribes to the Microsoft ASK price via the RMDS (RFA) engine with the IDN service:

=RTD("Vistasource.RtdServer",,"rt","vsRMDS2","IDN","MSFT.O", "ASK")

Example of an RTD function for subscribing to multiple fields:

To retrieve multiple field values with one formula, the RTD function would need to return an array of data. However, RTD does not support this functionality (see Microsoft KB article 286258). To work around this limitation, the RTW wrapper function PARSE_DATA can be used. This function “parses” the string array of incoming data. See RTW Functions for more information. The Quote dialogs will automatically use the PARSE_DATA function when creating array formulas.

The following formula subscribes to the Microsoft ASK and BID prices in real-time via the RMDS (RFA) engine with the IDN service:

{=PARSE_DATA(RTD("vistasource.rtdserver",,"rt","vsRMDS2","IDN","MSFT.O","ASK","BID"))}
For PARSE_DATA to work properly, the “Decimal separator” in Microsoft® Excel needs to be set to “.” (period), and the “Thousands separator” needs to be set to “,” (comma). To verify this setting, please check Excel Options → Advanced → System Separators.
See Also: