Creating a New DDE Link

Dynamic Data Exchange (DDE) Links are a good way to enhance the functionality of your spreadsheet. They are used to establish a link between a "source" (or server) file (e.g., an Excel spreadsheet) and a client file (e.g., a Statistica data file) so that when changes are made to the data in the source file, the data will be automatically updated in the Statistica spreadsheet (client file). See DDE Link Types.

A common application for dynamically linking two files would be in industrial settings, where the Statistica spreadsheet would be dynamically linked with a measurement device (e.g., in order to automatically update specific measurements hourly).

Note that before you can create a DDE Link in a Statistica spreadsheet, you need to open the file that is to act as the source file (e.g., an Excel spreadsheet). Unless the source is open, it will not be visible to the client (e.g., a Statistica data file) and you will not be able to select it within the frames mentioned below. An alternative to opening the source file is to know the exact location of the application that will service the source file, the name of the source file, and the specific row and column ranges of the data to be linked into the client file.

To create a DDE Link in your STATISTICA Spreadsheet, follow these instructions:

  1. Select the Edit tab. In the Links group, click DDE to display the Manage DDE Links dialog box.

  2. In the Manage DDE Links dialog box, click the New Link button to display the New DDE Link dialog box.

  3. Type in the link statement in the DDE link box. See DDE Link Statements for an explanation of how a link statement is constructed.

If you are unsure of the exact syntax for the link statement and you have the source file open, you can use the three frames at the bottom of the dialog box, which act as active DDE servers, to help you build the appropriate link statement.

Service. This frame provides a list of all active server applications. For instance, if you have Microsoft Excel open on your computer, Excel would be an available resource under Service.

Topics. This frame provides a list of all available objects that are associated with the Service you selected. For instance, if you selected Excel as the Service, the Topics frame would list all available Excel spreadsheets in the open workbooks.

Items. This frame provides a list of all available items that correspond to the Service and Topic that you selected. If you want to link to a cell or a range of cells in the selected Excel spreadsheet, type in the cell address or address for range of cells in the Edit box, following the first two parts of the link statement. Note that to specify your range of cells, use "R" [row] and "C" [column] values [e.g., !r1c1:r7c 8].

Either type the link statement in the Edit box, or use the Service, Topics, and Items frames to build your link statement. In the illustration below, we have selected Excel as the Service, Sheet 1 of Book 1.xls as the Topic, and Row 1, Column 1 (R1C1) through Row 5, Column 2 (R5C2) as the Items. See DDE Link Statements.

Note that in some cases, the Items frame may be blank. For example, if you are creating a link to a range of cells in an Excel spreadsheet, you can select Excel as the Service and the appropriate spreadsheet as the Topic. In order to complete the link statement, click in the Edit field and type an exclamation point, followed by the desired range of cells (e.g., !R1C1:R5C2). In this example, the completed link statement is as follows:

@Excel|[Book1.xls]Sheet1!R1C1:R5C2

This link statement links the specified cells in the Excel spreadsheet to cells in the STATISTICA Spreadsheet.

4. Click OK.

5. In the Manage DDE Links dialog, click Close.

See also: DDE Links - Overview, DDE Link Statements, DDE Link Types, Editing a DDE Link, Deleting a DDE Link, Disabling a DDE Link, and Updating Links.