Using CitectSCADA > Exchanging Data with Other Applications > Using the Citect Tags Excel macros

Using the Citect Tags Excel macros

CitectSCADA provides the Citect Tags Excel macros, which permit you to display the value of CitectSCADA variables directly in an Excel worksheet cell (so that you do not need to use Cicode DDE functions). The macros are contained in a workbook named ddeformu.xls (in the \CitectSCADA 7.10\bin directory), which was updated to support Network DDE with product version 5.41 and later.

Note: Microsoft Excel version 8 which shipped with Microsoft Office 97 provides macro virus protection to minimize the likelihood of potentially malicious macros from running. To enable macros, and be able to use the features provided with ddeformu.xls, in Excel 8, from the main menu, choose Tools | Options and on the General tab clear the Macro Virus Protection option.

Microsoft Excel version 9, which shipped with Microsoft Office 2000, provides security levels which silently disables macros by default. To enable macros, and be able to use the features provided with ddeformu.xls, in Excel 9 or later, from the main menu, select Tools | Macro | Security and select Medium or Low.

If your Excel security settings are enabled, when you attempt to open the ddeformu.xls, Excel informs you that the file contains macros. To enable the Citect Tags features, select Enable Macros.

When started, the Citect Tags macros expect that CitectSCADA runtime is operating on the same machine. If not, Excel displays a dialog requesting permission to start citect.exe (which may not succeed as citect.exe does not exist unless you're running Citect version 3 or earlier). If you further select Yes, it will search the system 'path' for the non-existent program and subsequently report that the application could not be found. If you select No, and if previous values were saved with the worksheet, those are the values that will display initially, and be replaced with '#REF!' when updated. In any case, no valid values will be displayed in the example worksheets until CitectSCADA runtime is started and Excel is subsequently refreshed or restarted.

The Citect Tags macros expect the citect.ini to exist in the config folder of the CitectSCADAv7.20 User and Data folder selected during installation. If the file is not found in the location, it will not search elsewhere and will instead display the 'ERROR Reading Citect.INI' dialog requesting the proper location. Enter the full path including the file name, and clear Restore Defaults on Start Up to prevent the same thing happening next time the macro is started. If you are using an alternative INI file, enter it instead.

Once running, the right-click menu in Excel contains four additional menu items, permitting you to perform two new workbook related commands, and two new CitectSCADA-related commands to the cell beneath the mouse pointer location when you perform the right-click event. The new menu items provided with ddeformu.xls are: