Excel as RTD server?

B

Boon

I am just wondering whether we can use Excel as a RTD
Server; if so, how?
All the documentation is about writting a program that
pushes data into excel, but we want excel to push real-
time data back to our program.
Any help will be appreciated, thanks!

Regards,
Boon
 
W

Wei-Dong Xu [MSFT]

Hi Boon,

Thank you for posting in MSDN managed newsgroup!

The article Rob suggested will help you a lot concerning this topic. If you have any further question regarding this issue, please feel free to let me
know.

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.
 
B

Boon

No, this doesn't help my query!
As I have stated in my original post, The help file
doesn't tell us whether there are any RTD Server built
into Excel. All it tells u is how to build a RTD server
which excel can retrieve data from, not the other way
around (I need excel to be a server, and use my program;
as a client; to retrieve data from excel). Let just say
that I need to replace my DDE processes, and DDE can be
used to communicate both way, and RTD seem to be only
going one way.

PS.
-----Original Message-----
Hi Boon,

Thank you for posting in MSDN managed newsgroup!

The article Rob suggested will help you a lot concerning
this topic. If you have any further question regarding
this issue, please feel free to let me
 
W

Wei-Dong Xu [MSFT]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top