External Interfaces Previous page   Next Page

DDE Advisory Links

You can use DDE to notify a client application when data at a server has changed. For example, if you use MATLAB to analyze data entered in an Excel spreadsheet, you can establish a link that causes Excel to notify MATLAB when this data changes. You can also establish a link that automatically updates a matrix with the new or modified spreadsheet data.

MATLAB supports two kinds of advisory links, distinguished by the way in which the server application advises MATLAB when the data that is the subject of the item changes at the server:

You set up and release advisory links with the ddeadv and ddeunadv functions. MATLAB only supports links when MATLAB is a client.

This example establishes a DDE conversation between MATLAB, acting as a client, and Microsoft Excel. The example extends the example in the previous section by creating a hot link with Excel. The link updates matrix z and evaluates a callback when the range of cells changes. A push-button, user interface control terminates the advisory link and the DDE conversation when pressed. (For more information about creating a graphical user interface, see the online MATLAB manual, Creating Graphical User Interfaces.)


Previous page  Example -- Importing Data From an Excel Application Web Services in MATLAB Next page

© 1994-2005 The MathWorks, Inc.