CSV Specifications

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

A file specification lists the fields from the spreadsheet in the order they are imported or exported, the filename (optional) and the delimiter between columns. Once you have defined one or more specifications, one can be selected in the CSV Import/Export dialog as the current specification to apply during an import or export action.

CSV 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 (Object Model).

To define a specification, select the Project | Import/Export | CSV Import/Export Specifications menu option. The CSV Import/Export Specification dialog displays.


The CSV Import/Export File Specification dialog provides the following functionality:


Use to

Specification Name

Select the unique name for this specification.


Specify 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 all instances of " in the field are doubled (that is, " becomes "").


Record a brief description of the specification.

Default Filename

Select the default filename.

Default Direction

Set the default action - Import or Export. A specification can be used in either direction, but this enables you to set the default type.

Default Types

Limit the element types being exported, by entering a comma-separated list: for example, class,requirement,component,node,object.


If you specify element types, ONLY elements of those types are exported or imported. Therefore, in order to enable 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

Include fields generated by Enterprise Architect to embed/reconstruct the package hierarchy. See the Using Preserve Hierarchy section for more details.

Available Fields

Select from a list of possible record fields, not yet allocated.

File Specification

List the record fields (in the order they are plotted across the spreadsheet) already assigned.

Add Field

Move all selected fields in the top list to the bottom list.

Remove Field

Move all selected fields in the bottom list back to the available list.


Create a new specification.


Save changes to the currently selected specification.

Save As

Save the current specification with a new name.


Delete the current specification.


Close this dialog.


In Available Fields and File Specification, the record fields Created Date and Modified Date are not set when imported from CSV.

Using Preserve Hierarchy

When selected, the Preserve Hierarchy option inserts two fields into the CSV specification that are:

  • automatically populated by Enterprise Architect on export and
  • used to reconstruct the exported package's hierarchy upon import.





A unique identifier for the current element.


This key is unique per export; subsequent exports produce different keys for the same set of elements.


The corresponding CSV_KEY of the current element's parent. If the field is left blank or references a non-existent CSV_KEY, the element is added to the top level of the package.

However, if you intend to import hierarchical information from a spreadsheet that was not populated by exporting data from Enterprise Architect, you must add these two fields to your spreadsheet as the last two columns, and populate the columns yourself. For example:

CVS Hierarchy


It is highly recommended that you do not change these fields by hand if they have been automatically generated by Enterprise Architect's CSV exporter.