Data Transformation Engine Functions and Expressions Reference Guide

Chapter 3 - Function Reference DDEQUERY
Functions and Expressions Reference Guide
94
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
This function returns a single-text-item.
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 8
th
row, 1
st
column to the 14
th
row, 3
rd
column is
A8:C14.) The content of this spreadsheet range is returned as a single text
item.
Note This example assumes that the map, the Excel spreadsheet, and the Mercator
application all reside in the same directory. If they are not in the same
directory you need to 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.