Using CitectSCADA > Exchanging Data with Other Applications > Using Microsoft Excel to Edit .dbf Tables > Functionality

Functionality

The add-in is automatically available to Excel when the add-in is installed by the CitectSCADA installation. When you open Microsoft Excel you will see a new toolbar called Project DBF Add-in, containing the following fields and buttons:

  1. Master.dbf location
  2. SaveDBF table
  3. SCADA project
  4. SCADA table
  5. Save DBF
  6. Save As
  7. Open DBF
  8. Save Only/Save and re-index

To access the tables using the Add-In:

  1. If the location of the Master.dbf file is not displayed in the master.dbf location field, it will display Enter path to master.dbf. Click on this field to display a dialog box where you can enter the location. This populates the SCADA Project field.
  2. Click the drop down arrow in the SCADA Project Field to select the Project in which the .dbf file (table) resides that you want to open. This populates the SCADA Table field.

    Note: Any tables listed in the ExcludedProjectTables.xml are excluded from the list of tables.

  3. Click the drop down arrow in the SCADA Table field to select the table. The table will open in Microsoft Excel as a new worksheet named with the table name. If the table is a read only table an alert (sometimes referred to as a "warning") message is displayed advising you that it is read only.

Alternatively, if the dbf file that you wish to open is not the Master.dbf file, or is not located in the root dbf file location, click the Open DBF button and browse to the location of the dbf file that you want to open.

To edit the contents of the table in Microsoft Excel

A table in .dbf format is displayed in Microsoft Excel in the following equivalent format:

You may edit any of the data in the table, shown as cells within a row. You may delete a record shown as a row, and add a record. However you cannot change the structure of the table by modifying the name of any Field, shown as a column, add a column or delete a column. If you do change the structure an alert message will be displayed when you attempt to save the table.

If you edit a cell in the table take care not to exceed the maximum field length set for that field in the table.

To save a table in Microsoft Excel

  1. Select to Save and re-index the table, or Save Only, from the drop down control on the toolbar.

If you do not re-index an indexed table the table will be saved more quickly, but you will need to manually re-index the table when you have completed your edits. To re-index manually, select Pack from the File menu of the CitectSCADA Project Editor.

  1. Click the SaveDBF table button.

When you save the table the Add-In performs the following checks prior to saving the table:

  1. Verifies that the file type is .dbf.
  2. Checks for any changes in table structure that may have been made. For restrictions on changes to the table structure, refer to "To edit the contents of the table in Microsoft Excel".
  3. Updates the existing table according to the data in the Microsoft Excel worksheet.
  4. Re-indexes the updated table if it is was an indexed table (if Save and re-index was selected).

If the edited table in the Microsoft Excel worksheets does not pass every check, an alert (sometimes referred to as a "warning") message is displayed and the existing table on disk will not be affected until you correct the condition that caused any check to not pass.

You can also save a dbf file with a different name by clicking the Save As button on the toolbar and entering a name for the file. This method of saving also includes the option of saving the dbf file with or without re-indexing the table.

Note: If you attempt to save a table in .dbf format in Microsoft Excel using the Microsoft Excel File > Save command an alert message is displayed advising you that the file cannot be saved in the current format and that use the SaveDBF button on the Microsoft Excel toolbar.