Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default excel focus problems with custom RTD server (real time data)

I have a worksheet with RTD formulas in it. When the real time data
changes, excel grabs focus. (ie. excel pops itself to the front) How
do I stop excel from grabbing focus?

I've seen a couple of posts that seem related, but I haven't found any
solutions:

http://groups.google.com/groups?hl=e...bl%26rnum%3D14

http://groups.google.com/groups?q=ex...TNGXA11&rnum=1


I've also run many tests and found some odd behavior:

If I create an excel workbook with only formulas that use the
bloomberg.rtd server, things seem fine (excel does not grab focus). I
can have hundreds of these formulas and dependent formulas, etc.

If I create an excel workbook that contains references to the rtd
server that I have written (in VC++), excel grabs focus when these
values change.

I have looked through the code for my RTD server very carefully, but I
can't seem to find any problems with it. It provides data to excel
through the standard RTD interface -- data comes in, I store it in a
set, I call UpdateNotify(), when excel has some spare cycles it calls
be back with RefreshData() and I give it the data in my set.

Any help / insight / workarounds would be appreciated.

BTW, I am using WindowsXP / Excel2002.

Thanks,
steven
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default excel focus problems with custom RTD server (real time data)

After a little more investigation, this seems to also be a problem
with the BLOOMBERG.RTD. Here is a quick sample:

cell A1: IBM
cell A2: =RTD("BLOOMBERG.RTD",,A1 & " Equity", "BID")
cell A3: =if( mod(100*A2,2)=0, na(), "ASK")
cell A4: =RTD("BLOOMBERG.RTD",,A1 & " Equity", A3)


You can also do something like:

cell A1: IBM
cell A2: =RTD("BLOOMBERG.RTD",,A1 & " Equity", "BID")
cell A3: =if( mod(100*A2,2)=0, RTD("BLOOMBERG.RTD",,A1 & " Equity",
"ASK"), "no rtd")

I can't find any documentation on microsoft's site or anywhere else
that says RTD can't support these use cases. I've talked to bloomberg
on help and they claim that BLOOMBERG.RTD does not support these use
cases. It seems like something that would be very common though. Any
thoughts?



(S Guy) wrote in message . com...
I have a worksheet with RTD formulas in it. When the real time data
changes, excel grabs focus. (ie. excel pops itself to the front) How
do I stop excel from grabbing focus?

I've seen a couple of posts that seem related, but I haven't found any
solutions:

http://groups.google.com/groups?hl=e...bl%26rnum%3D14

http://groups.google.com/groups?q=ex...TNGXA11&rnum=1


I've also run many tests and found some odd behavior:

If I create an excel workbook with only formulas that use the
bloomberg.rtd server, things seem fine (excel does not grab focus). I
can have hundreds of these formulas and dependent formulas, etc.

If I create an excel workbook that contains references to the rtd
server that I have written (in VC++), excel grabs focus when these
values change.

I have looked through the code for my RTD server very carefully, but I
can't seem to find any problems with it. It provides data to excel
through the standard RTD interface -- data comes in, I store it in a
set, I call UpdateNotify(), when excel has some spare cycles it calls
be back with RefreshData() and I give it the data in my set.

Any help / insight / workarounds would be appreciated.

BTW, I am using WindowsXP / Excel2002.

Thanks,
steven

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default excel focus problems with custom RTD server (real time data)

A little more investigation shows that this occurs ANY time you
attempt to use a dynamic topic in an RTD formula. I created a small
sample worksheet that randomly picks "Chair" or "Lamp" from Microsofts
"Wide World Importer" RTD example. Every time the topic changes,
Excel grabs focus. This behavior seems consistant with the other 2
threads that I linked in my origional post. Right now, TweakUI seems
like the best workaround, however it is only a work around. I need to
allow other business critical applications to take focus as needed.

Hopefully someone from Microsoft is reading this and will be able to
suggest a better fix. If there is not a fix for this problem, I don't
see many use cases where RTD will solve my real time data in excel
problems. RTD will become another instance of a good idea missing the
mark by just enough to make it almost useless.


(S Guy) wrote in message . com...
After a little more investigation, this seems to also be a problem
with the BLOOMBERG.RTD. Here is a quick sample:

cell A1: IBM
cell A2: =RTD("BLOOMBERG.RTD",,A1 & " Equity", "BID")
cell A3: =if( mod(100*A2,2)=0, na(), "ASK")
cell A4: =RTD("BLOOMBERG.RTD",,A1 & " Equity", A3)


You can also do something like:

cell A1: IBM
cell A2: =RTD("BLOOMBERG.RTD",,A1 & " Equity", "BID")
cell A3: =if( mod(100*A2,2)=0, RTD("BLOOMBERG.RTD",,A1 & " Equity",
"ASK"), "no rtd")

I can't find any documentation on microsoft's site or anywhere else
that says RTD can't support these use cases. I've talked to bloomberg
on help and they claim that BLOOMBERG.RTD does not support these use
cases. It seems like something that would be very common though. Any
thoughts?



(S Guy) wrote in message . com...
I have a worksheet with RTD formulas in it. When the real time data
changes, excel grabs focus. (ie. excel pops itself to the front) How
do I stop excel from grabbing focus?

I've seen a couple of posts that seem related, but I haven't found any
solutions:

http://groups.google.com/groups?hl=e...bl%26rnum%3D14

http://groups.google.com/groups?q=ex...TNGXA11&rnum=1


I've also run many tests and found some odd behavior:

If I create an excel workbook with only formulas that use the
bloomberg.rtd server, things seem fine (excel does not grab focus). I
can have hundreds of these formulas and dependent formulas, etc.

If I create an excel workbook that contains references to the rtd
server that I have written (in VC++), excel grabs focus when these
values change.

I have looked through the code for my RTD server very carefully, but I
can't seem to find any problems with it. It provides data to excel
through the standard RTD interface -- data comes in, I store it in a
set, I call UpdateNotify(), when excel has some spare cycles it calls
be back with RefreshData() and I give it the data in my set.

Any help / insight / workarounds would be appreciated.

BTW, I am using WindowsXP / Excel2002.

Thanks,
steven

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default excel focus problems with custom RTD server (real time data)

I've gotten several emails regarding this post, so I figured I'd just
post my current work-around.

The general idea of the work-around is to set up proxy subscriptions.
For every dynamic topic that you want to have, you set up a proxy. To
do this, I had to add a couple of extra calls to my dll.

int GenerateProxyId(unique id) - This function generates a proxy id and
binds it to some unique info. For my unique info, I use the workbook
name + cell name of the thing that is calling GenerateProxyId. You
need to do this so that when you open multiple workbooks in the same
excel instance you don't get id conflicts between workbooks.

DateTime AttachData(proxyId, data) - This is a call that I use to
attach dynamic data to proxy ids. I return a DateTime because it is
kind of useful to know when the last time your dynamic topic changed.
I keep a hash of proxyId-last change time so that if AttachData gets
called and it is the same data or there is an error condition or
something, I can just return the last good date.

I also added a special branch through my code to look for a special
topic "proxy". So when I get a call like
=RTD("My.RTD",,"proxy",3,"#bar") In this case, I would see that it was
a special "proxy" topic using the proxyId 3. I would look up the proxy
data 3 and find something like "dynamic-foo" and then attach it to the
static part of the subscription "#bar" and get something like
("dynamic-foo", "bar"). By having the ability to combine static data
with dynamic data, you can save some proxy/attachData calls. For
instance, if you wanted to have 2 subscriptions (stock, "BID") and
(stock, "ASK) where stock was a dynamic value, you would just have the
following:

=GenerateProxyId("my workbook.xls", "A5") -- 3
=AttachData( 3, stock) -- 12:03:05
=RTD("My.RTD",,"proxy",3, "#BID")
=RTD("My.RTD",,"proxy",3, "#ASK")

* I use the # symbol to indicate weather the proxied data should go
#before or after# the static data.

That's about it as far as the solution goes. It's a very painful way
to do something that seems like it should be there out of the box. The
code gets pretty ugly too. With the static data + dynamic data
combining, you have to do several one to many mappings and reverse
mappings.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Capturing Real Time Data Rob Excel Worksheet Functions 2 February 24th 10 04:44 AM
creating dataseries from real time data Maurice Excel Worksheet Functions 0 April 10th 07 02:54 PM
storing real time data Meng Excel Discussion (Misc queries) 1 September 15th 06 04:58 AM
Excel 2003's autosum does not update data in real time KokWoei Excel Worksheet Functions 2 April 4th 06 05:12 AM


All times are GMT +1. The time now is 08:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"