ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel RTD - no topics on workbook open (https://www.excelbanter.com/excel-programming/414051-excel-rtd-no-topics-workbook-open.html)

[email protected]

Excel RTD - no topics on workbook open
 
In common with
http://groups.google.co.uk/group/mic...1e0616f686017a,
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

Craig Burton

Excel RTD - no topics on workbook open
 
wrote:
In common with
http://groups.google.co.uk/group/mic...1e0616f686017a,
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.

<snip

Hmm... not a lot of RTD programmers out there perhaps! Any suggestions
as a better place to post the query?

thanks, Craig

Gonzo

Excel RTD - no topics on workbook open
 
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

"Craig Burton" wrote:

wrote:
In common with
http://groups.google.co.uk/group/mic...1e0616f686017a,
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.

<snip

Hmm... not a lot of RTD programmers out there perhaps! Any suggestions
as a better place to post the query?

thanks, Craig



All times are GMT +1. The time now is 07:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com