Import and Update Requirements From MS Excel

Documentation / Import

You can import new objects or update attribute values to existing documents from CSV files. You can even export a document to a CSV file, edit the CSV file in Excel, and import changed CSV file back to in ReqView to update attributes or outgoing traceability links for imported document objects.

Note: Imported CSV files must have column names corresponding to IDs of attributes and link types to import CSV correctly, see examples below.

Import New Objects

To import new document objects from a CSV file into an existing 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.

ReqView preserves the tree hierarchy of imported document objects, heading of document sections, text description of requirements, and values of custom attributes.

Imported CSVs files should contain the following columns:

  • “level” — hierarchy level of imported objects (integer); if not provided, then CSV rows are imported as a flat list
  • “heading” — heading of a document section displayed in the Description column
  • “text” — requirement text description displayed in the Description column
  • custom attribute ID — value of the custom attribute
  • link type ID — list of outgoing traceability links, i.e. IDs of target document objects

No CSV column can be named “id” as ReqView assigns unique IDs automatically for the new imported objects.

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”, 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 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”, “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 the following columns:

  • “id” — identifier of an existing document object to be updated
  • “heading” — heading of a document section displayed in the Description column
  • “text” — requirement text description displayed in the Description column
  • custom attribute ID — value of the custom attribute
  • link type ID — list of linked target object IDs (e.g. “SRS-53,SRS-106”)

The column “id” is mandatory. If it is empty then a new object is added 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 in ReqView from a CSV file
  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.

    Update verification links in ReqView from a CSV file
  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

      Convert text strings 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,"")

      Convert text strings to columns
    • Join new columns in the TESTS sheet to one column using TEXTJOIN Excel function: =TEXTJOIN(",",TRUE,L16:T16)

      Convert text strings to columns
    • Change heading of the joined verification column to “verification” and remove all other columns except the column “id” in the TESTS sheet.

      Convert 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.15.0