Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

CSV Specifications

To import and export element data to and from Enterprise Architect using CSV files, you must first set up one or more CSV file specifications. A file specification defines the:

  • Fields from the spreadsheet in the order they are imported or exported
  • Source or target filename (optional) and
  • Delimiter between columns

Once you have defined one or more specifications, you can select one in the 'CSV Import/Export' dialog as the current specification to apply during an import or export action. The facility only imports and exports elements (within Packages) and their properties; items such as Class attributes cannot be imported or exported through this mechanism.

XMI import/export provides a solution to this limitation, as does use of the Automation Interface.

Access

Ribbon

Publish > Model Exchange > CSV > CSV Exchange Specification

Set Up a CSV Specification

Field

Action

See also

Specification Name

If creating a new specification, type in a unique specification name.

If editing an existing specification, click on the drop-down arrow and select the specification name.

Delimiter

Click on the drop-down arrow and select the character delimiter to use between record fields.

If a field contains an instance of the delimiter, the field is exported wrapped in " (quotation marks) and any instances of " in the field are doubled (that is, " becomes "").

Notes

Type in a brief description of the specification.

Default Filename

Type in the default file location and file name to be used when importing and exporting.

Alternatively, click on the Browse. button and browse for the location.

Default Direction

Click on the drop-down arrow and select the default action - 'Import' or 'Export'.

Each specification can be used in either direction, but this field provides the default.

Default Types

Type in a comma-separated list to limit the element types being exported; for example: class,requirement,component,node,object.

  • If you specify element types, ONLY elements of those types are exported or imported; so, for the 'Preserve Hierarchy' option to operate (if selected) you must include Package as an element type, otherwise there are no Packages in which to preserve the hierarchy
  • If you do not specify any default element types, all elements including Packages are exported or imported and the hierarchy can be preserved

Preserve Hierarchy

Select this checkbox to include fields generated by Enterprise Architect, to embed/reconstruct the Package hierarchy.

Using Preserve Hierarchy

Available Fields

Click on the name of an available field, and double-click on it to add it to the Specification (it displays at the end of the 'File Specification' list).

Press and hold Ctrl while you select several fields, but use the Add field button to transfer them all to the 'File Specification' list.

File Specification

Review the record fields already assigned, listed in the order in which they are plotted across the spreadsheet.

If you want to change the sequence of fields, click on a field name and click on the Move up or Down green arrow icon button to move the field name up or down the list.

Add Tagged Value Field

Click on this button to add a Tagged Value column to the CSV Specification, to import or export the value that an element has for a particular tag.

A prompt displays to select one of two options:

  • Value - to import or export the content of the Tagged Value 'Value' field; a column heading with the prefix 'TagValue_' is added to the Specification
  • Notes - to import or export the content of the Tagged Value 'Notes' field (some Tagged Values use the 'Notes' field to accommodate long values, such as <memo> text); a column heading with the prefix 'TagNotes_' is added to the Specification

In each case, the 'Add Tag Value Field' dialog displays. Select either the:

  • 'Global Tagged Values' radio button, or
  • 'Tagged Values from the selected Element' radio button, click on the Other Element button and browse for the name of the element that contains the Tagged Value

Click on the 'Tagged Value' field drop-down list and select the required Tagged Value, then click on the OK button.

Package Browser Options

Add Field

Click on this button to move all selected fields from the 'Available Fields' list to the 'File Specification' list.

Remove Field

Click on this button to move all selected fields from the 'File Specification' list back to the 'Available Fields' list.

New

Click on this button to clear all the dialog fields to create a new specification.

Save

Click on this button to save all changes to the currently selected specification.

Save As

Click on this button to save the current specification under a new name.

Delete

Click on this button to delete the current specification.

Close

Click on this button to close this dialog.

Notes

  • In the Corporate, Unified and Ultimate Editions of Enterprise Architect, if security is enabled you must have 'Export XMI', 'Import XMI' and 'Configure Resources' permissions to use the 'CSV Import/Export Specifications' option
  • In 'Available Fields' and 'File Specification', the record fields 'Created Date' and 'Modified Date' are not set when imported from CSV

Learn more