The information in this article applies to:
SYMPTOMSWhen executing the =REQUEST() macro to request data from a DDEML server application, Excel returns a value of #N/A, even though the server application returned a valid data handle from the request. CAUSE
When Excel executes a =REQUEST, it requests data in the most efficient
format available. Verifying through DDESPY when Excel executes the =REQUEST
macro, one can see that Excel sends out a request for data for each format,
in this order:
Knowing what formats it can handle best, Excel requests data in the most efficient format first, and so on, until it finds one that the server application supports. At this point, Excel stops sending further requests. In response to a request, a DDEML server application that supports only one format (for example, the CF_TEXT format) may return a data handle in CF_TEXT format, regardless of the format being requested. When Excel sends its first request for data in XLTable format, this server application returns a data handle in CF_TEXT format, as demonstrated in the code below:
Because Excel expected to receive data in the format it had requested (that is, XLTable format), and instead received date in CF_TEXT format, Excel returns #N/A, not knowing how to handle the data it received. RESOLUTION
In response to a request, a DDEML server application should return a valid
data handle only for the format it supports. When processing an
XTYP_REQUEST transaction, the server application should first check whether
the data being requested is in its supported format; if so, the server
application should return an appropriate data handle. Otherwise, the server
application should return NULL.
Additional query words: 3.10 3.50 4.00
Keywords : |
Last Reviewed: September 24, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |