XL2002: Calling a Server by Using the RealTimeData (RTD) Function (277618)



The information in this article applies to:

  • Microsoft Excel 2002

This article was previously published under Q277618

SUMMARY

Microsoft Excel 2002 provides a new worksheet function called RealTimeData (RTD). This function allows you to call a Component Object Model (COM) Automation server so that you can retrieve data in real time. The RTD function has an optional argument for the name of the server. This article describes how this argument works.

MORE INFORMATION

When you use the RTD function, you specify the program ID of the registered COM automation add-in from which to retrieve the data. You can run the real-time data server on either the local computer or remotely.

Running the Server Locally

If you want to run the real-time data server locally, you can omit the server argument for the RTD function. The following example queries the locally registered COM add-in with the program ID of MyComAddIn.ProgID with the topic argument Current.
=RTD("MyComAddIn.ProgID",,"Current")
				
The following example queries the local computer named Dixon and gives you the same result as the preceding example:
=RTD("MyComAddIn.ProgID", "Dixon", "Current")
				
If you use the RTD function in two different cells and each has the same arguments, one ConnectData call is made to retrieve the information. For example, if cells A1 and B1 each have the following formulas
   A1   =RTD("MyComAddIn.ProgID",,"Current")
   B1   =RTD("MyComAddIn.ProgID",,"Current")
				
then only one call is made. However, if one cell uses the server argument and the other one does not, as shown in the following example, two ConnectData calls are made to the server:
   A1   =RTD("MyComAddIn.ProgID","Dixon","Current")
   B1   =RTD("MyComAddIn.ProgID",,"Current")
				

Running the Server Remotely

You must configure the RTD server on both the local client computer and the remote server to use the RTD server with Excel. The second parameter of the RTD function should specify the remote server on which the RTD server is installed:
=RTD("MyComAddIn.ProgID","RemoteServer","Current")
				

REFERENCES

For additional information about how to configure a remote RTD server, click the article number below to view the article in the Microsoft Knowledge Base:

285888 HOWTO: Use an Excel RTD Server with DCOM

For more information about about Real-Time Data, click Microsoft Excel Help on the Help menu, type RTD in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

For additional information about RTD servers and Excel, click the article numbers below to view the articles in the Microsoft Knowledge Base:

285339 HOWTO: Create a RealTimeData Server for Excel 2002

289150 HOW TO: Set Up and Use the RTD Function in Excel 2002


Modification Type:MajorLast Reviewed:3/22/2002
Keywords:kbhowto KB277618