This page
http://www.swi-prolog.org/pldoc/man?section=DDE
has an example for talking with program manager.
The example there is pretty straightforward.
Here's one for using Excel as a DDE server:
1. Start Excel without a document, (the default workbook is called Book1)
2. click in cell A1 and enter howdy
3. Click above in the named cell space and name the cell onions
4. start SWI-Prolog and do
6 ?- open_dde_conversation('Excel', '[Book1]Sheet1', C).
C =
3.to start a DDE conversation
make a request for the value in onions:
8 ?- dde_request(3, 'onions', X).
X = "howdy\r\n".
and close the conversation:
9 ?- close_dde_conversation(3).
Cc:
cdio...@gmail.com;
anni...@yahoo.com
Sent: Wednesday, March 4, 2015 3:48 PM
Subject: Re: [SWIPL] Excel VBA - SWI Prolog