Use an Excel RTD Server with DCOM

费好大劲找到的文章,留存。

 

Use an Excel RTD Server with DCOM
如何使用DCOM的Excel RTD服务器

Microsoft Office Excel 2007,Microsoft Office Excel 2003和Microsoft Excel 2002提供了一个名为RealTimeData(RTD)的新工作表函数。RTD允许您调用组件对象模型(COM)自动化服务器以实时检索数据。此RTD服务器可以作为ActiveX DLL或作为在同一本地计算机或远程服务器上运行的.exe存在。当RTD服务器在远程服务器上运行时,RTD服务器使用DCOM与Excel通信。

注意当RTD服务器在远程服务器上运行时,RTD服务器必须是.exe。

 

本文介绍如何在远程服务器和本地客户端计算机上配置DCOM以启用此功能。
更多信息
在远程服务器上配置DCOM
在将用作远程服务器的计算机上注册RTD服务器。请注意,必须在远程服务器和本地客户端计算机上安装Excel。
在任务栏上,单击“ 开始”按钮,单击“运行”,键入Dcomcnfg.exe,然后单击“ 确定”以启动DCOM配置实用程序。
在“ 默认安全性”选项卡上,编辑“ 默认访问权限”并添加允许访问RTD服务器的所有用户。对于公共RTD服务器,添加Everyone以允许匿名访问RTD服务器。将访问类型设置为允许访问。
将相同的条目添加到“ 默认启动权限”列表中,并将“访问类型”设置为“ 允许启动”。
将相同的条目添加到“ 默认配置权限”列表中。对于大多数RTD服务器,将访问类型设置为Read应该就足够了。对于使用注册表存储设置的RTD服务器,可能需要将“访问类型”设置为“ 完全控制”。
在本地客户端计算机上配置DCOM
在本地客户端计算机上注册RTD服务器。要Excel在远程服务器上请求RTD服务器,只需要注册ProgID和CLSID。
在本地客户端计算机上运行Dcomcnfg.exe。
在“ 默认安全性”选项卡上,编辑“ 默认访问权限”,然后添加“ Everyone”帐户。RTD服务器必须调用Excel以在新数据可用时通知它。由于Windows安全性的特性,即所谓的“单跳规则”,RTD服务器以匿名用户的身份回调Excel。如果默认访问权限下未列出Everyone帐户,则RTD服务器无法与Excel通信,Excel中的RTD公式将返回#N / A.
在本地客户端计算机和远程服务器上配置RTD服务器后,在本地客户端上启动Excel并将RTD函数输入到工作表上的单元格中。使用RTD功能的第二个参数指定安装RTD服务器的远程服务器:
= RTD(“RTDEXE.RTDServer”,“RemoteServer”,“AAA”)
参考
有关Excel和RTD服务器的更多信息,请单击下面的文章编号,以查看Microsoft中的文章 知识 基地:

***************************************************************

How to use an Excel RTD server with DCOM
O 電子郵件
列印
Summary
Microsoft Office Excel 2007, Microsoft Office Excel 2003, and Microsoft Excel 2002 provide a new worksheet function that is named RealTimeData (RTD). RTD lets you call a Component Object Model (COM) Automation server for retrieving data in real time. This RTD server can exist as an ActiveX DLL or as an .exe that runs on the same local computer or on a remote server. When the RTD server runs on a remote server, the RTD server uses DCOM to communicate with Excel.

Note When RTD server runs on a remote server, the RTD server must be an .exe.

 

This article describes how to configure DCOM on both the remote server and on the local client computer to enable this functionality.
More Information
Configure DCOM on the remote server
Register the RTD server on the computer that will serve as the remote server. Note that Excel must be installed on both the remote server and the local client computer.
On the taskbar, click the Start button, click Run, type Dcomcnfg.exe, and then click OK to start the DCOM configuration utility.
On the Default Security tab, edit Default Access Permissions and add any users that are permitted to access the RTD server. For a public RTD server, add Everyone to allow anonymous access to the RTD server. Set Type of Access to Allow Access.
Add the same entries to the Default Launch Permissions list, and set the Type of Access to Allow Launch.
Add the same entries to the Default Configuration Permissions list. For most RTD servers, setting the Type of Access to Read should be sufficient. For RTD servers that use the registry to store settings, it may be necessary to set the Type of Access to Full Control.
Configure DCOM on the local client computer
Register the RTD server on the local client computer. For Excel to request the RTD server on the remote server, only the ProgID and CLSID need to be registered.
Run Dcomcnfg.exe on the local client computer.
On the Default Security tab, edit the Default Access Permissions, and add the Everyone account. The RTD server must make calls to Excel to notify it when new data becomes available. Because of a feature of Windows security, the so-called "One Hop Rule," the RTD server makes its call back to Excel as an anonymous user. If the Everyone account is not listed under Default Access Permissions, the RTD server is unable to communicate with Excel, and RTD formulas in Excel return #N/A.
After you configure the RTD server on both the local client computer and the remote server, start Excel on the local client and enter the RTD function into a cell on a worksheet. Use the second parameter of the RTD function to specify the remote server on which the RTD server is installed:
=RTD( "RTDEXE.RTDServer", "RemoteServer", "AAA" )
References
For more information about Excel and RTD servers, click the following article number to view the article in the Microsoft Knowledge Base:

285339 How to create a RealTimeData server for Excel

內容
文章識別碼:285888 - 最後檢閱時間:2009年3月23日 - 修訂: 1

posted @ 2019-07-24 01:22  Charltsing  阅读(805)  评论(0编辑  收藏  举报