原創(chuàng)|其它|編輯:郝浩|2012-10-08 14:42:59.000|閱讀 971 次
概述:Microsoft Excel 2002提供了一種新特性來實(shí)時(shí)查看和更新數(shù)據(jù)代替原有的動(dòng)態(tài)數(shù)據(jù)交換Dynamic Data Exchange(DDE),這一新途徑一直沿用到后來的Excel 2003、2007、2010和2013版本。這個(gè)特性的強(qiáng)大之處是處理不斷變化的數(shù)據(jù)比如股票報(bào)價(jià)、匯率、庫存水平、報(bào)價(jià)、天氣預(yù)報(bào)、體育成績等等。Add-in Express支持RTD技術(shù),并提供與COM插件和Smart Tags智能標(biāo)記相同的RAD的方式。對于Excel GUI的高級定制,Add-in Express還提供了一些高級任務(wù)窗格Advanced Task Panes并支持EExcel Automation以及XLL外接程序用于開發(fā)自定義用戶定義函數(shù)(UDF)。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
Microsoft Excel 2002提供了一種新特性來實(shí)時(shí)查看和更新數(shù)據(jù)代替原有的動(dòng)態(tài)數(shù)據(jù)交換Dynamic Data Exchange(DDE),這一新途徑一直沿用到后來的Excel 2003、2007、2010和2013版本。這個(gè)特性的強(qiáng)大之處是處理不斷變化的數(shù)據(jù)比如股票報(bào)價(jià)、匯率、庫存水平、報(bào)價(jià)、天氣預(yù)報(bào)、體育成績等等。Add-in Express支持RTD技術(shù),并提供與COM插件和Smart Tags智能標(biāo)記相同的RAD的方式。對于Excel GUI的高級定制,Add-in Express還提供了一些高級任務(wù)窗格Advanced Task Panes并支持EExcel Automation以及XLL外接程序用于開發(fā)自定義用戶定義函數(shù)(UDF)。下面是這一特性的具體介紹:
To create a new real-time data server project with Add-in Express, close all opened solutions, choose File | New | Project, select the "Other Projects | Extensibility Projects" item, click the Add-in Express RTD Server icon, and click the OK button.
This will start the wizard that asks you to select a programming language, either C# or VB.NET, and then generates the project.
The project contains an RTD Server module, which is the core part of every Excel RTD Server developed with Add-in Express. The file name for the module is RTDServerModule.vb or RTDServerModule.cs for VB.NET and C# projects respectively. You place RTD Server Topic components onto the module's designer in order to create the information interface of your RTD Server. To add topics to your real-time date server, the module provides a special command available either in the Properties window or in the context menu of the module's designer. Also, you handle RTD Server properties and events in the module.
|
Refresh interval for the RTD server |
|
Allows specifying if the RTD server should be registered for all users on the PC |
|
When Excel initializes and closes the RTD server |
An RTD Server topic component allows you to specify a part of the information flow provided by the Excel real-time data server. You identify the topic using its properties and handle its RefreshData event.
Private Function TopicLastPrice_RefreshData(sender As System.Object) As System.Object _ |
Handles TopicLastPrice.RefreshData |
|
Dim actualTopic As AddinExpress.RTD.ADXRTDTopic = _ |
CType(sender, AddinExpress.RTD.ADXRTDTopic) |
Dim symbol As String = actualTopic.String02 |
Try |
If IsValidSymbol(symbol) Then |
Return GetLastPrice(symbol) |
Else |
Return "Unknown symbol" |
End If |
Catch ex As Exception |
Return "error" |
End Try |
End Function |
Private Function TopicLastPrice_RefreshData(sender As System.Object) As System.Object _
Handles TopicLastPrice.RefreshData
Dim actualTopic As AddinExpress.RTD.ADXRTDTopic = _
CType(sender, AddinExpress.RTD.ADXRTDTopic)
Dim symbol As String = actualTopic.String02
Try
If IsValidSymbol(symbol) Then
Return GetLastPrice(symbol)
Else
Return "Unknown symbol"
End If
Catch ex As Exception
Return "error"
End Try
End Function
|
String01, String02, ... String28 - these properties allow uniquely identify the topic |
|
The default value for the topic |
|
When the rtd topic is connected and disconnected |
|
When the topic is required to refresh its value |
You deploy and update your Excel RTD server in a variety of ways described in the Developer Tutorial: Step 7. Deploying the RTD server. Your real-time data server can be per-user or per-machine, i.e. for all users on the PC.
You may also be interested in:
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:慧都控件網(wǎng)