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
Use an Excel RTD Server with DCOM的更多相关文章
- 浅谈Excel开发:五 Excel RTD函数
上文介绍了Excel中的UDF函数,本文介绍一下同样重要的RTD函数.从Excel 2002开始,Excel引入了一种新的查看和更新实时数据的机制,即real-time data简称RTD函数 ...
- 工作时间看股票:采用Excel RTD技术获取和讯网的实时股票行情及深沪港最新指数
本文地址:http://www.cnblogs.com/Charltsing/p/RTD.html QQ:564955427 在Excel里面获取实时数据大概有几种方式:1.定时器+函数2.DDE3. ...
- 在windows server 2008 R2 64bit上面配置PI OPC Server的DCOM
今天想配置PI OPC SERVER的DCOM设置,但是发现在“运行dcomcnfg->组件服务-计算机-我的电脑-DCOM设置”中找不到PI OSI DA Server.如下图所示 这是以前从 ...
- VBS将本地的Excel数据导入到SQL Server中
VBS将本地的Excel数据导入到SQL Server中 高文龙关注0人评论1170人阅读2017-05-14 12:54:44 VBS将本地的Excel数据导入到SQL Server中 最近有个测试 ...
- 浅谈Excel开发:六 Excel 异步自定义函数
上文介绍了Excel中的自定义函数(UDF ),它极大地扩展了Excel插件的功能,使得我们可以将业务逻辑以Excel函数的形式表示,并可以根据这些细粒度的自定义函数,构建各种复杂的分析报表. 普通的 ...
- MFC 简单输出EXCEL - (OLE)
三图胜千言: 就是酱紫: //打印领料表 void CKnifeDlgDlg::PrintCurUsedTabel(int order) { // TODO: Add your command han ...
- VS2010对Excel操作---DLL向
最近公司有个项目要用到Excel的操作,于是自己就对VC中关于Excel的操作进行整理了下.而这里我是直接做成DLL方便他人调用的. 创建一个MFC Dll项目. 选择MFC扩展DLL. 在“类视图” ...
- VC2010对Excel的操作
1. 创建新的C++工程 创建基于对话框的MFC程序 2. 添加库.添加Excel类库 在工程名上右键,选择“添加”—“类”(或者点击菜单栏的“项目”->“添加类”),选择“TypeLib中的M ...
- c# 调用EXCEL在VS上能正常运行,部署在IIS上不能实现,在VS中运行页面和发布之后在IIS中运行的区别
发现一篇文章,很好,解决了这个问题:感谢原博主!特此做个笔记. 地址:http://www.cnblogs.com/zhongxinWang/p/3275154.html 发布在IIS上的Web程序, ...
随机推荐
- JQ向上取整 和向下取整 四舍五入
向上取整 var a = 23.2325236 var abc = Math.ceil(a); //注意:Math.ceil(a)不要单独写一行,否则向上取整失败 abc = 24; ...
- PostgreSQL 自增主键
1.自增主键:2.创建序列 一.使用SERIAL自增主键 create table test_no( id SERIAL primary key, name ) ); 二.创建序列 INCREMENT ...
- bagging and boosting
bagging 侧重于降低方差 方差-variance 方差描述的是预测值的变化范围,离散程度,也就是离期真实值的距离.方差过大表现为过拟合,训练数据的预测f-score很高,但是验证或测试数据的预测 ...
- 织梦DedeCMS栏目列表常见序号的调用标签
我们在制作dedecms模板时,源代码中的[field:global name=autoindex/]标签很好用可以调用数字序号,此标签最简单的用法就是按内容条数来获取数字序号,但有的时候发现使用该标 ...
- Mybatis分页-利用Mybatis Generator插件生成基于数据库方言的分页语句,统计记录总数 (转)
众所周知,Mybatis本身没有提供基于数据库方言的分页功能,而是基于JDBC的游标分页,很容易出现性能问题.网上有很多分页的解决方案,不外乎是基于Mybatis本机的插件机制,通过拦截Sql做分页. ...
- Clob类型转换为String
SQL CLOB 是内置类型,它将字符大对象存储为数据库表某一行中的一个列值,使用CHAR来存储数据,如XML文档. 如下是一个Clob转换为String的静态方法,可将其放在自己常用的工具类中,想直 ...
- xml_SAX解析
(一)SAX解析 1.1 SAX解析 SAX:基于事件处理的机制 sax解析xml文件时,遇到根开始标签,根结束标签,开始解析文件,文件解析结束,字符内容,空白字符等都会触发各自的方法. 优点: 适合 ...
- elastic 基本操作
官方参考文档: https://www.elastic.co/guide/cn/elasticsearch/guide/current/index-doc.html 1.查看 有哪些索引: curl ...
- Redis常见的七种使用场景
简单字符串缓存实战简单队列实战简单发布订阅实战简单计数器实战排行榜实战简单字符串悲观锁实战简单事务的乐观锁实战 简单字符串缓存实战 $redis->connect('127.0.0.1', ...
- Dubbo 03 Restful风格的API
目录 Dubbo03 restful风格的API 根路径 协议 版本 用HTTP协议里的动词来实现资源的增删改查 用例 swagger(丝袜哥) OpenAPI 资源 编写API文档 整合Spring ...