Excel RTD - no topics on workbook open

C

craig

In common with
http://groups.google.co.uk/group/mi...k=st&q=rtd+topics+open+excel#5f1e0616f686017a,
having created an Excel RTD server I find that after saving a workbook
(Excel 2003) with RTD functions referencing that server and opening
again, Excel shows only the last (now stale) data and does not update.

Running in the VS 2005 debugger reveals that no topics are subscribed
to by the reopened workbook, though the RTD server is receiving it's
info from a remote server (RTD server is local, it just connects to a
remote server to retrieve values) and running the Excel
Application.RTD.RestartServers does not seem to have any effect.
Wrapping the RTD function which was suggested elsewhen on this list
similarly does not work.

The RTD server is written in VB.NET though I don't see how that would
make a difference. I also can't see that it's the RTD server's job to
save the topics Excel is subscribing to, across openings of the
workbook - Excel wouldn't know about the topics after reopening again
anyhow, presumably?

Any clues v gratefully received.

Thanks, Craig
 
G

Gonzo

Your return array has the wrong format; it may have a max dimension of 2; one
for the topicID and one for the value.
You actually are not feeding Excel but a representation of topic/value array
which then is refected in Excel as cell changes.

Check out the article http://support.microsoft.com/kb/285339/en-us (VB6)
Inspect carefully the function IRtdServer_RefreshData of the example. There
you'll see that
the result array sent back to Excel is redimed only in the second extension:

=> ReDim aUpdates(0 To 1, 0 To m_colTopics.Count - 1) As Variant

So the Array contains two elements

1. for the Topics (another array within)
2. the values (another array within)


Well that's VB6 but in VB.Net it's the same but replacing Variant by Object.

MIGE
 

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