A few RTD Questions

K

Ken Rangel

1) What is the best way to call UpdateNotify()? I currently have one thread
dedicated to calling this method when data changes (it continually calls the
method every .1 seconds until Excel calls refresh data).
2) Is there a one to one mapping between an UpdateNotify call and a
subsequent RefreshData call? It seems that there are many UpdateNotify
calls that go 'unanswered' by excel.

Any help or information best practices for using the UpdateNotify() /
RefreshData() mechanism would be greatly appreciated.

Thanks in advance,

Ken Rangel
 
K

KJTFS

Not really much help to you but when I made a RTD I used a lot o
msgbox's with the location of where they are calling (update
refresh...) Sort of gave me a visualization of what was going on.
Maybe you could try that if you already haven't.

Hope that helps a little.

Keith
www.kjtfs.co
 
W

Wei-Dong Xu [MSFT]

Hi Ken,

Thanks for posting in the community!

From my understanding to this issue, you would like to know the best way to
use the UpdateNotify method and whether there is one mapping between the
UpdateNotify and RefreshData method.

In fact, for the RTD(Real Time Data) scenario, we can treat Excel as one
monitor who watches his own running state and waits for the update message
sent from the RTD server. Excel will retrieve the data from the RTD server
only when it considers its own state ok and the RTD server has any update.
For example, if one user is editting one cell, Excel will think it is busy
now and it has no bandwidth for the RTD; at this time, even if one update
message has been sent by the UpdateNotify method from the RTD server, Excel
will remember the update message and retrieve the data from RTD server when
it is not very busy later.

This is to say, for the RTD server, it has to be waiting for Excel to be
free and obtain the data. The RTD server can't expect the Excel to retrieve
the data immediately when the server has any update at any time, except
when Excel is always in idle state. So for the first question, you use the
UpdateNotify method very correctly. As to the second question, based on my
introduction above, the RefreshData method may not be called by Excel to
retrieve the data when it is in busy state, even severals update messages
have been sent to it with UpdateNotify.

In addition, the Excel 2002 RTD FAQ from MSDN will provide more information
for you.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexcl2k2/h
tml/odc_xlrtdfaq.asp

Please feel free to let me know if you have any further questions. Our
pleasure to be of assistance for you.

Have a nice day!

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