Hi Boon,
Thank you for replying and more information concerning your scenario!
From my understanding to your issue now, you are going to set the Excel workbook as the data source in RTD. Then your client side will retrieve
the data from this workbook through RTD.
Microsoft Excel 2002 and 2003 provide a 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. In this scenario, we can see the Excel as the consumer of RTD. However, so
far as I know, Excel is not capable of being a RTD source. This is to say, we can't set the Excel as the data source for your client Application
through RTD.
Based on the kb article 257757 suggested by Jim, there are many Problems we should cover for the server-side automation which will be very
tough for you to build the solution.
I'd suggest you may try another way in this scenario. Excel VBA can use the "OnTime" method to trigger sending data to another application. Excel
can also determine when a RTD server has given it an RTD update, and use that as a trigger to send data to another application.
If you use the method, you may try to do some IPC stuff to send data to your application.
e.g. write your application as an DCOM server for the excel to automation.
Interprocess Communications
http://msdn.microsoft.com/library/d...n-us/ipc/base/interprocess_communications.asp
Or
you may try to pull data from excel by automation excel.
e.g. you can try to sink the Worksheet_Change event in your application to pull data from excel's sheet, or you may try to use a timer to pull data
from excel regularly.
'Code begin ------------------------------------------
Dim o As Object
Private Sub Form_Load()
Set o = GetObject(, "excel.application")
End Sub
Private Sub Timer1_Timer()
Debug.Print o.activesheet.cells(1, 1)
End Sub
'Code end ------------------------------------------
The method has some drawback. When the A1 cell was in edit mode the app will hang on the code line
Debug.Print o.activesheet.cells(1, 1)
In addition, it will be appreciated you tell me why you want to design yoru solution in this way with more detailed information regarding your
scenario. Perhaps I can provode more assistance for you concerning this issue.
Please feel free to let me know if you have any further questions.
Does this answer your question? Thank you for using Microsoft NewsGroup!
Wei-Dong Xu
Microsoft Product Support Services
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.