Importing spreadsheets

The import spreadsheet tool imports comma-separated value (CSV) and tab separated value (TSV) files that have been created with packages such as Microsoft Excel or Microsoft Access.

Before you begin

If the module already contains objects, the spreadsheet is imported after the current object. Select the object where you want to import the data.

About this task

In CSV files and TSV files, the rows and columns of the spreadsheet or database table are stored as lines of text. Typically, each line represents a row in the spreadsheet or database, and contains data from each column. Each data item in a line is separated by a comma, or a tab, depending on the type of the file. Strings that contain new line characters are enclosed in quotation marks.
When a spreadsheet is imported into a module, an object is created for each line of data in the file. You can use an attribute list or column labels to assign data in the file to attribute values in the module. If the attributes do not exist, the tool creates them. The attribute types are normally derived from the type of data found in the columns. Alternatively, you can choose the type you want from a list of defined types.
  • If you use an attribute list, you create a list of existing attributes that correspond with the columns in the file you want to import. The attribute types must be appropriate for the data in each column, or the import fails. If there are empty fields, the default attribute value is assigned by the importer.
  • If you use column labels, the contents of the fields in the first line are interpreted as the column labels. The column labels determine the attribute that is used for each column.
    Note: The first column in the spreadsheet must have a column label, otherwise the attributes are not allocated correctly by the importer.

Data items in a CSV or TSV file can have integer, real, date, or string values. Strings are typically contained within quotation marks, and can contain commas, tabs, and line breaks. Quotation marks can be imported if they are duplicated. For example, looking at the CSV file with a text editor, the string: "This string has a comma, which is not imported and a quotation mark "" too" is imported as: This string has a comma which is not imported and a quotation mark " too .

Procedure

  1. Click File > Import > Spreadsheet.
  2. Select the file that you want to import and the options that you want to apply. For more information about the import options, click Help.
  3. Click Import.

What to do next

For more information, see this video on youtube.com: Best Practices for Importing Data into IBM Rational DOORS
Related concepts:
Importing data into formal modules

Feedback