Excel DDE and Socket C#

R

Raymond Chiu

Dear all,



I have the project which is mainly based on excel DDE and it is server and
client program.

In server, there is 1000 random numbers generating per second. It is not
excel based. It may be c sharp program acting as socket server.



In client, it is excel file with custom functions. If user type in the
formula in the cell e.g. getnumber("10"), it will get the current number 10
value in the server. It is hoped that the server and client data refresh in
real time.



I really don't know how DDE Excel apply in this case?? Would socket
programming apply in this case??

Do you have any instructions to teach me how to do??
 
P

Peter Duniho

Raymond said:
I have the project which is mainly based on excel DDE and it is server and
client program.

In server, there is 1000 random numbers generating per second. It is not
excel based. It may be c sharp program acting as socket server.

In client, it is excel file with custom functions. If user type in the
formula in the cell e.g. getnumber("10"), it will get the current number 10
value in the server. It is hoped that the server and client data refresh in
real time.

I really don't know how DDE Excel apply in this case?? Would socket
programming apply in this case??

I doubt DDE has anything to do with the question, but without a
concise-but-complete code example that shows exactly what you're doing,
it'd be hard to say for sure.

Most likely, you've got some kind of managed code being called by Excel
via some user-defined function. If so, then you should be able to
ignore the Excel side of things altogether. Your managed code is
providing via the API called from Excel the interface to Excel.

So between your managed code called by Excel and your server, you can
just use any appropriate network protocol (most likely TCP). Beyond
that, it's up to you to decide how to make those two endpoints
communicate. You can use plain sockets, or something more elaborate
(e.g. WCF).

In any case, network i/o is never "real time". There will always be
some delay between what happens in your server and the ability of your
Excel-connected client code to observe it.

Certainly it is possible for a server to generate random numbers, and
then for a client to receive those numbers. But if taken literally,
your problem statement doesn't allow for something that can be done.

Note that if you find yourself creating and posting a
concise-but-complete code example, and if that example cannot be
understood without any mention whatsoever of Excel, then this really
isn't the right newsgroup. I believe that there is in fact an
Office/Excel-specific newsgroup for interop questions like that.

Pete
 

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