Import and Update Requirements From MS Excel

Documentation / Import

You can import tabular data from MS Excel or other spreadsheet using the Comma-separated Values (CSV) file format to:

  • Import New Objects — create new objects in the current document. For instance, you can migrate requirements from another RM tool.
  • Update Documents — set attribute values and outgoing traceability links for existing objects in the current document. For instance, you can set status of test cases executed in other tool.
  • Roundtrip — export a ReqView document to a CSV file, edit the CSV file in Excel, and import changes from the CSV file back to ReqView.

CSV files store tabular data in plain text format delimited by comma, tab, or semicolon. The first line of the CSV file described mapping of CSV text values to ReqView attributes or traceability links. The conversion of CSV text to attribute values depends on the attribute type as follows:

  • int — text is an integer value, e.g., “123”.
  • bool — text is a boolean value, i.e., “TRUE” / “FALSE”, “YES” / “NO”, or “1” / “0”.
  • string — text is a string value.
  • date
    • text is an integer value representing a time stamp, e.g., “1693551600000”.
    • text is a date / time value in ISO 8601 format, e.g., “2023-09-01”, “2023-01-01T09:00”.
  • real — text is a floating point value, e.g., “3.14”.
  • enum
    • text is a key value defined for the single-value enumeration attribute, e.g., “Draft” for Requirement Status.
    • text is a list of key values defined for the multi-value enumeration attribute, e.g., “Desktop,Mobile” for Allocation to Components.
  • xhtml — text is a string value. If the value is wrapped by HTML tag <html> then rich text formatting is preserved, otherwise it is HTML escaped. For instance, value “Hello” is imported as “<p>Hello</p>” and value “<html><body><p>Hello</p></body></html>” is imported as “<p>Hello</p>”.

Import New Objects

To import new document objects from a CSV file into the current ReqView document, click File, mouseover Import, mouseover CSV File, and select whether you want to import new objects Add Before, Add After or Add As Children of the selected object.

CSV import will preserve the tree hierarchy of imported document objects, heading of document sections, text description of requirements, attribute values, and outgoing traceability links leading to existing objects. You can import incoming traceability links leading from existing objects to imported objects later, see Update Documents.

Imported CSVs files should contain the following columns:

  • level — import hierarchy levels of imported objects (integer). If not provided, then CSV rows are imported as a flat list.
  • heading — import section headings displayed in the Description column.
  • text — import text descriptions displayed in the Description column.
  • <custom attribute ID> — import custom attribute values.
  • <link type ID> — import outgoing traceability links specified in the given list of linked target object IDs, e.g., “SRS-53,SRS-106”.

No CSV column can have name id as ReqView assigns unique IDs to all imported objects automatically.

Note: If ReqView does not create new document objects or creates empty document objects then double check if the CSV header contains correct IDs of ReqView attributes. For instance, if your CSV file contains column “Description” it is ignored by the importer. You need to split this column to columns “heading” storing section headings and “text” storing requirement description.

Example: Import a CSV file to create new users needs in a specific section of the NEEDS document based on the User Stories Specification Template.

  1. In MS Excel, change column names in the first row to match the IDs of ReqView internal attributes level, heading, text, and custom attributes asAn, iWant, soThat, and status.

    Import user stories from CSV to ReqView
  2. In MS Excel, click File, click Save a Copy, and select CSV UTF-8 (Comma delimited) (*.csv) file type (available in the latest Excel versions) or Unicode Text (*.txt) file type (available in Excel 2016 and older versions).

  3. In ReqView, open the NEEDS document and select a section for placing the imported objects. Click File, mouseover Import, mouseover CSV File, and select Add As Children. Finally, choose the CSV (or TXT) file created in the previous step.

Update Documents

To update attributes or outgoing traceability links of existing ReqView document objects from a CSV file, click File, mouseover Import, mouseover CSV File, and select Update Document.

Imported CSV files should contain should contain the following columns:

  • id — match identifier of an existing document object to be updated.
  • heading — update section headings displayed in the Description column.
  • text — update text descriptions displayed in the Description column.
  • <custom attribute ID> — update custom attribute values.
  • <link type ID> — update outgoing traceability links as specified in the given list of linked target object IDs, e.g., “SRS-53,SRS-106”.

The column id is mandatory. If it stores an empty value then the row is imported as a new object at the end of the document.

Note: If ReqView does not update the document objects then double check if the CSV header contains correct IDs of ReqView attributes. For instance, if your CSV file contains column “Description”, which is ignored by the importer, then split this column to columns “heading” storing section headings and “text” storing requirement description.

Example: Import a CSV file to update verification links leading from test cases stored in the TESTS document to SW requirements stored in the SRS document.

  1. In MS Excel, change column names in the first row to “id” and “verification”.

    Update verification links exported from ReqView in Excel
  2. In MS Excel, click File, click Save a Copy, and select CSV UTF-8 (Comma delimited) (*.csv) file type (available in the latest Excel versions) or Unicode Text (*.txt) file type (available in Excel 2016 and older versions).

  3. In ReqView, open the TESTS document, then click File, mouseover Import, mouseover CSV File, and select Update Document. Finally, choose the CSV (or TXT) file created in the previous step.

Roundtrip Synchronization

To edit attributes or outgoing traceability links for selected document objects in Excel:

  1. Export a ReqView document into a CSV file, see Customize CSV Export.
  2. Edit the CSV file in Excel.
  3. Update the document from the CSV file, see Update Documents.

Example: Recover verification traceability links from test cases in the TESTS document to SW requirements in the SRS document due to renumbering of SW requirement IDs (using a document template).

  1. Save original IDs of the SRS document:

    • Create custom attribute origId in the SRS document.
    • Export the SRS document to a CSV file.
    • Open the CSV file in Excel, remove all columns except id and origId, and copy values from column id to column origId. Finally save the file.
    • Update the SRS document from the CSV file.
  2. Duplicate the SRS document:

  3. Export verification links from the TESTS document to CSV file TESTS.csv, see Customize CSV Export.

    In Excel open a CSV exported from ReqView containing verification links
  4. In Excel, redirect verification links from the TESTS document to point to the SRS-new document instead of the SRS document:

    • Open CSV files SRS-new.csv and TESTS.csv as separate sheets in one application window.

    • Select the verification column on the TESTS sheet, click Data, click Text to Columns, select Delimited, check Comma as a delimiter in the Convert Text to Colums Wizard.

      In Excel convert verification links to columns
    • For each verification column in the TESTS sheet, insert a new column replacing original SRS IDs by new SRS-new IDs using XLOOKUP Excel function matching the IDs in the id and origId in the SRS-new sheet: =XLOOKUP(TEXT(TESTS!B16,"0"),'SRS-new'!$B2:$B185,'SRS-new'!$A2:$A185,"").

      In Excel replace target document of verification links
    • Join new columns in the TESTS sheet to one column using TEXTJOIN Excel function: =TEXTJOIN(",",TRUE,L16:T16).

      Join columns with verification links exported from ReqView in Excel
    • Change heading of the joined verification column to “verification” and remove all other columns except the column “id” in the TESTS sheet.

      In Excel convert verification links text strings to columns
    • Save TESTS sheet to CSV file TESTS-fixed.csv

  5. In ReqView, update the TESTS document from the CSV file TESTS-fixed.csv.

    Convert text strings to columns
Updated for version 2.19.0