DDE help please...converting an Excel reference

chris (reverseThis) suite101 at net.earthlink
Mon Aug 14 00:19:23 EDT 2000


I have a program called Qlink that provides stock quotes via DDE.

To place stock data on a spreadsheet, I enter an array reference on the
sheet in the following format:

=Qlink|TS!'yhoo,5'

This DDE formula will return 5 time-and-sales (trade) records for Yahoo.

I have reviewed the "DDE client" python example that comes with the Win32
Starship distro (It it shown below), but can't determine the proper sequence
of Python commands.

My question is, how is this Excel DDE reference converted into the
appropriate sequence of Python commands so I can retrieve data from the
Qlink app?

chris


THE PYTHON STARSHIP DDE CLIENT EXAMPLE:
===============================================
# 'Request' example added jjk  11/20/98

import win32ui
import dde

server = dde.CreateServer()
server.Create("TestClient")

conversation = dde.CreateConversation(server)

conversation.ConnectTo("RunAny", "RunAnyCommand")
conversation.Exec("DoSomething")
conversation.Exec("DoSomethingElse")

conversation.ConnectTo("RunAny", "ComputeStringLength")
s = 'abcdefghi'
sl = conversation.Request(s)
print 'length of "%s" is %s'%(s,sl)
===============================================






More information about the Python-list mailing list