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 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 provides a solution to this limitation, as does use of the Automation Interface.
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:
Option |
Use to |
||
Specification Name |
Select the unique name for this specification. |
||
Delimiter |
Specify the character delimiter to use between record fields.
|
||
Notes |
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: e.g. class,requirement,component,node,object.
|
||
Preserve Hierarchy |
Include fields generated by Enterprise Architect to embed/reconstruct the package hierarchy. Please 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 order) 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. |
||
New |
Create a new specification. |
||
Save |
Save changes to the currently selected specification. |
||
Save As |
Save the current specification with a new name. |
||
Delete |
Delete the current specification. |
||
Close |
Close this dialog. |
Note: |
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.
Field |
Description |
||
CSV_KEY |
A unique identifier for the current element.
|
||
CSV_PARENT_KEY |
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. |
Note: |
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. |
