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 (example, an Excel spreadsheet) and a client file (example, a Statistica data file) so that when changes are made to the data in the source file, the data is automatically updated in the Statistica spreadsheet (client file).

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 (example, in order to automatically update specific measurements hourly).

Note: 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 (example, an Excel spreadsheet). Unless the source is open, it is not visible to the client (example, a Statistica data file) and you are not able to select it within the following mentioned frames. An alternative to opening the source file is to know the exact location of the application that services 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.

Option Description
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 [example, !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 following illustration, 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: In some cases, the Items frame might 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 (example, !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.

  1. Click OK.
  2. 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.