DDEQUERY

The DDEQUERY function allows you to interface to other Windows applications such as Trading Partner PC, Excel, and so forth, provided that certain criteria are met.

For example, if you receive an Excel spreadsheet file, you must have the appropriate version of the Excel application installed (that is compatible with the file received) and the application must be open.

Syntax:
DDEQUERY (single-text-expression , single-text-expression , single-text-expression)
Meaning:
DDEQUERY (application_name , topic , text)
Returns:
A single text item from an application

Examples

  • DDEQUERY ( "excel" , "[MKTPRICE.XLS]Sheet1" , "R8C1:R14C3" )

    In this example, DDEQUERY is used to get data from an Excel spreadsheet. The third argument, R8C1:R14C3, specifies the location of the data in the spreadsheet. (In Excel, the 8th row, 1st column to the 14th row, 3rd column is A8:C14.) The content of this spreadsheet range is returned as a single text item.

    This example assumes that the application, the map, and the spreadsheet all reside in the same directory. If they are not in the same directory you must add the path. For example:

    DDEQUERY ( "excel" , "c:\spreadsheet[MKTPRICE.XLS]Sheet1" , "R8C1:R14C3" )

  • DDEQYUERY ("tppc","PartnerX","BGyourEDIode")

    In this example, DDEQUERY is used as a request to Trading Partner PC.

Related functions

  • EXIT
  • FAIL
  • GET
  • LASTERRORCODE
  • LASTERRORMSG
  • PUT
  • RUN
  • VALID