When VTS is a local DDE client, data can be entered in the cell of an Excel spreadsheet, and the value will be reported as the value of a tag in VTS.
Note: There must be one input tag created in your VTS application for each cell of data that you wish to read from the Excel spreadsheet.
There are four basic tasks required if you wish VTS to read data from the cell of an Excel spreadsheet. These are:
1. Create a new Excel spreadsheet or modify an existing Excel spreadsheet, ensuring that the path to the file is correctly configured within Excel for VTS to locate it.
2. Configure a new DDE driver tag within your VTS application to communicate between VTS and Microsoft Excel.
3. Configure a new input tag within your VTS application to read the data from a specified cell in the Excel spreadsheet to ensure that communications are occurring as they should.
4. Test the connection.
Instructions on completing these tasks are described in detail below.
Note: To configure VTS as a network DDE client, please refer to “Using DDE to Enable VTS to Accept Values from an Excel Spreadsheet ".
Part 1: Create a New or Modify an Existing Microsoft Excel Spreadsheet to Ensure the Path and Reference Style are Correctly Configured
The first step in establishing VTS as a DDE client is to either create a new Microsoft Excel spreadsheet, or modify an existing one as directed below.
1. Run Microsoft Excel.
2. Create a new spreadsheet OR open an existing spreadsheet.
3. Select Tools|Options in Microsoft Excel's menu. The Options dialog will open.
4. Click the General tab.
5. Enter the path to your application directory in the Default File Location field (e.g. C:\VTS\MyApplication).
6. Select the R1C1 Reference Style checkbox.
7. Click the OK button.
8. Save the file to your application directory:
a) If this is a new Microsoft Excel file, select File | Save As in the menu, and save the file to your application directory (C:\VTS\MyApplication) OR
b) If this is an existing Microsoft Excel file, select File | Save. If the location of the existing file is not your application directory, relocate it now.
The instructions that follow will help to guide you through the creation of a new DDE driver tag within your VTS application.
Part 2: Configure a DDE Tag to Facilitate Communications Between VTS and Microsoft Excel
The second step in facilitating communications between VTS (the client) and Microsoft Excel is to create and draw a new DDE tag. To do so, follow the instructions below.
1. Run VTS. The VAM will open.
2. Select the VTS application that you wish to accept data from the Microsoft Excel spreadsheet.
3. Click the Run button to run the application.
4. Logon to the application (if necessary) using a user account that has full development privileges.
5. Open the page on which you wish to draw the tags related to the DDE connection.
6. Click the Configure button to open the Configuration Toolbox.
7. Click the Browser button to open the Tag Browser.
8. Select DDE Driver from the Types drop-down list.
9. Click the New button. A new DDE Driver tag properties folder will open as shown below.

10. Enter a name for the new DDE driver tag in the Name field.
11. Enter an appropriate area for the new DDE driver tag in the Area field.
12. Enter an appropriate description for the new DDE driver tag in the Description field. An example of a completed ID tab for a DDE driver tag properties folder is shown below.

13. Click the Local DDE tab to view its properties. An example is displayed below.

14. Enter Excel in the DDE Application Name field.
15. Enter the name of the Microsoft Excel file you created above in the DDE Topic Name field. The completed Local DDE tab should appear similar to the example displayed below.

Note: The Network DDE tab does not require configuration for a local DDE client. To configure VTS as a network DDE client, please refer to “Using DDE to Enable VTS to Accept Values from an Excel Spreadsheet".
16. Click the OK button to close the DDE driver tag properties folder. You will be returned to the Tag Browser where the new DDE driver tag will be selected in the list of available tags.
17. Click the Draw button. The drawing methods available to DDE tags will be displayed as shown below.

18. Click the Comm Indicator button. The default Comm Indicator square will be attached to the mouse pointer.
19. Position the Comm Indicator on the page. The Comm Indicator Style dialog will open similar to the example shown below.

20. Click the OK button.
The Comm Indicator object enables you to determine the status of communications between the DDE driver and the external application at a glance by changing color. By default, green indicates communications are occurring, red indicates that communications have failed, and gray indicates that the tag is reading invalid (as it currently should be).
The next step is to configure and draw a new analog input tag to read data that has been entered in the Microsoft Excel spreadsheet.
Part 3: Configure a New Input Tag to Read Data from the External Application
The next step in setting up VTS as a DDE client is to configure a new analog input tag to read data entered into the specified cell of the specified Microsoft Excel file. This tag will help you to confirm that data is being transmitted from Microsoft Excel to VTS.
Note: The Tag Browser should still be open from the last set of instructions. If it is not, open the Tag Browser now.
1. Select Analog Input from the Types drop-down list.
2. Click the New button. A new analog input tag properties folder opens as shown.

3. Enter an appropriate name for the new analog input tag in the Name field.
4. Enter an appropriate area for the analog input tag in the Area field.
5. Enter an appropriate description for the analog input tag in the Description field. The completed properties for the ID tab of the analog input tag properties folder should appear similar to the example shown below.

6. Click the I/O tab. The properties of the I/O tab are displayed as shown below.

7. Select the name of the DDE driver tag from the I/O device drop-down list.
8. Enter the address of the location from which you wish to read data in the Address field. (In our example, we wish to read data from row 1 cell 1 of the Excel spreadsheet, therefore we will enter "r1c1" in the Address field. The completed I/O tab should appear similar to the one shown below.

9. Click the OK button. You are returned to the Tag Browser where the new analog input tag is displayed and selected.
10. Click the Draw button. The drawing methods for analog input tags are displayed.
11. Select one of the drawing methods that display the numeric value of the tag (i.e. Numeric Value or Meter1, Meter2, or Meter3). The style dialog associated with the selected drawing method opens.
12. Configure the drawing method's style as you require.
13. Click the OK button. The tag drawing method object is attached to the mouse pointer.
14. Position the drawing object on the page.
15. Click to drop the graphic representation of the analog input tag.
The final step in configuring VTS as a DDE client is to add a new output tag to enable the writing of data to the external application on the remote PC. Instructions are provided in the section that follows.
Part 4: Configure a New Output Tag to Write Data to the External Application
The next step in setting up VTS as a DDE client is to configure a new output tag (either analog or digital) to write data to the external application on the remote PC via the DDE tag created in Part 2.
1. Select Analog Output from the Types drop-down list.
2. Click the New button. The New Analog Output Properties folder opens.
3. Enter an appropriate name for the new analog output tag in the Name field.
4. Enter an appropriate area for the new analog output tag in the Area field.
5. Enter an appropriate description for the new analog output tag in the Description field. The completed properties of the ID tab of the analog output tag properties folder should appear similar to the example shown below.

6. Click the I/O tab. The properties of the I/O tab are displayed.
7. Select the name of the DDE driver tag created in Part 2.
8. Enter the address of the location to which you wish to write data in the Address field. (In our example, we wish to write data to row 1 cell 1 of the Excel spreadsheet, therefore we will enter "r1c1" in the Address field. The completed I/O tab should appear similar to the one shown below.

9. Click the OK button. You are returned to the Tag Browser where the new analog output tag is displayed.
10. Click the Draw button. The drawing methods for analog output tags are displayed.
11. Select the Numeric Entry drawing method. The Numeric Entry style dialog opens.
12. Configure the properties of the Numeric Entry style dialog as you require (see "6: Drawing Tags: Standard Tag Drawing Methods").
13. Click the OK button. The Numeric Entry object is attached to the mouse pointer.
14. Position the Numeric Entry object on the page.
15. Click to drop the graphic representation of the analog output tag.
16. Close the Tag Browser.
17. Close the configuration toolbox.