Using basic capabilities : Overview of using basic capabilities : Importing and exporting information : CSV and TXT format : Comma‑separated value (CSV) files
  
Comma‑separated value (CSV) files
The format for imported data is either text format or comma-separated value (CSV) format. CSV is the more powerful format. For example, if you are importing data elements, you can import data element names and descriptions, and the property values, such as length, storage class, and so on.
To determine what a valid CSV file should look like, use Dictionary > Export Definitions, and then inspect the output.
CSV format
The CSV format comprises a series of fields, separated by a comma:
aaaa,bbbb,,dddd,eeee,,,hhhh<end of line>
Each field contains one property value as defined in the Property Configuration Set. The end of each record is indicated by a carriage return/line feed.
The first line in the file is the header. It contains the property names, separated by a comma. This first line controls how subsequent lines are interpreted. The order of the properties of the first line does not matter; however, most users put the Name first.
Usually, each field is adequately delimited by a comma. However, if a field contains a comma (,), a carriage return, or a line feed, enclose the entire field in quotation marks ''. If there is an embedded quotation character, use double quotation characters ("").
aaaa,"bb""bb","cc,cc","dd<cr>dd",eeee,,,hhhh<eol>
Considerations when importing CSV files
When importing definitions that contain parenthesis in a LISTOF property value, they must be enclosed with quotations, for example:
"myprop(M)"
Not doing so causes the import to fail, and this error is included in the log panel:
Error message...Unbalanced right)
The following strings are treated the same when imported and the option Update single fields - clear field if no data is specified.
a,b
a,b,
Both strings are handled as if the values after "b" are omitted. If there were three fields in the above example and you wanted the last field to be empty, specify a double quotation mark to indicate an empty field, for example:
a,b,""
or add an extra separator for example:
a,b,,
The CSV file format is supported by Microsoft Excel and other programs.
When importing data in CSV format, choose from these options:
Never replace existing definition
Delete all fields then add new data
Update single fields when data supplied
Update single fields - clear field if no data
For information about the import options for CSV files, see Import options.
See also
Tools menu: Diagram glossary
Dictionary menu: Export Definitions
Exporting XML
Tools menu: Extract
Dictionary menu: Import Definitions
Importing XML
Tools menu: Merge
CSV and TXT format