| MATLAB Application Program Interface Reference | Help Desk |
ddereq
Request data from DDE server applicationdata = ddereq(channel, item, format, timeout)
dataA matrix that contains the requested data, empty if the function call failed.
channel
The channel assigned to the conversation, returned by ddeinit.
itemA string that specifies the server application's DDE item name for the data requested.
format(optional) A two-element array that specifies the format of the data requested.
The first element indicates a Windows clipboard format to use for the request. MATLAB supports only Text format, which corresponds to a value of 1. The second element of the format array specifies the type of the resultant matrix. The valid types areNUMERIC (the default, corresponding to a value of 0) and STRING (corresponding to a value of 1).
The default format array is [1 0].
timeout(optional) A scalar that specifies the time-out limit for this operation. timeout is specified in milliseconds (1000 milliseconds = 1 second). The default timeout is three seconds.
ddereq requests data from a server application via an established DDE conversation. ddereq returns a matrix containing the requested data or an empty matrix if the function is unsuccessful.
% Request a matrix of cells from Excel. mymtx = ddereq(channel, 'r1c1:r10c10');