1. Home
  2. DDEIMPORT procedure

DDEIMPORT procedure

Get data from a Dynamic Data Exchange (DDE) server, PC Windows only (D.B. Baird).


PRINT = string token Controls whether a catalogue of the structures read from the DDE server is printed (catalogue); default cata
SHOW = string token Whether to display the spreadsheet within the windows interface (yes, no); default no
IMETHOD = string token How identifiers are specified for the columns (read, supply, none); default read if COLUMNS is unset, supply otherwise


SERVER = text Name of DDE Server (ignored if GDEFILE is set); default Excel
TOPIC = text Name of DDE Topic
ITEM = text Name of DDE Item
GDEFILE = text Name of a previously saved Genstat DDE link file
COLUMNS = text Names and/or type codes for the columns read (the type of column can be forced by ending the column name, if supplied, with the code ! for a variate, # for a variate, and $ for a text)
ISAVE = pointer Name of a pointer to save the column identifiers


A DDE server is another windows program (e.g. Microsoft Excel) that will supply data on a DDE request. The data to be read via DDE is specified by the DDE triplet: server, topic and item. Alternatively the name of an existing GDE file containing these can be specified using the GDEFILE parameter. GDE files can be created by opening a spreadsheet with the Spread > New > from DDE Link menu item, and then saving the resulting spreadsheet with the file type Genstat DDE Link (*.GDE).

The TOPIC for Excel has the format '[]' e.g. '[D:/Work/Data.XLS]Data Summary', and the ITEM has the numerical format RC:RC e.g. 'R2C3:R25C5' or the format '<column</column letter>:<column</column letter>' e.g. 'C2:E25'.

The TOPIC for QPW has the format 'FileName' e.g. 'D:/Work/Data.WB3', and the ITEM has the format of 'Sheet:<column</column letter>..<column</column letter>' e.g. 'B:C2..E25'.

The COLUMNS parameter can be used to set the names of the structures. It can also be used to force the type of column by ending the column name with the code ! for a variate, # for a variate, and $ for a text. For example


will create a factor called Trt, a text called ID and a variate called Rank. If only the type code is provided, the columns will not be renamed, but the new types will set, e.g.


will force the first three columns to be of type factor, variate and text respectively.

(Note: DDEIMPORT replaces the procedure DDELOAD from earlier editions of Genstat.)




The DDE server is queried with the TOPIC and ITEM, and any data received from the DDE server is sent to a temporary GSH file which is read in with the SPLOAD directive.

Action with RESTRICT

Restrictions are not applicable to any of the parameters.

See also

Procedure: DDEEXPORT.

Commands for: Input and output.

Updated on March 8, 2019

Was this article helpful?