Coupling Microsoft Excel with NI Requirements Gateway Contents Using the Excel Type This document explains how NI Requirements Gateway interfaces with Microsoft Excel. Use this document to familiarize yourself with the Excel type in Requirements Gateway. Refer to Appendix A, Third-Party Types Overview, of the Getting Started with NI Requirements Gateway manual for more information about the elements of the Excel type. Using the Excel Type... 1 Selecting Excel Files to Analyze... 2 Variables of the Excel Type... 2 Requirements Traceability... 2 Capturing Worksheets from an Excel Document... 2 Requirements... 3 References... 3 Creating References from Requirements Gateway... 3 Intermediate File... 3 Creating Custom Excel Types... 5 Selecting a Conversion Tool... 5 Requirements Gateway includes the following default types for analyzing Excel files: Excel Captures traceability information from a single Excel (.xls) file. This type does not support Excel 2007 (.xlsx) files, but you can use Excel 2007 in compatibility mode to open Excel 2003 or earlier (.xls) files. Use the ExcelX type for Excel 2007 files. ExcelX Captures traceability information from a single Excel 2007 (.xlsx) file. Note Requirements Gateway cannot open password-protected Excel files.
Selecting Excel Files to Analyze Variables of the Excel Type When you add an Excel or ExcelX document to a project, you must specify the files to include in the document. Click the File Browse button in the File or Directory column on the Project pane to launch the Open dialog box, in which you can browse for the individual.xls or.xlsx file you want to use. When you add an Excel or ExcelX document to a project, the Worksheet variable becomes available in the Variable column on the Document Details pane of the Project pane of the Configuration dialog box, as shown in Figure 1. Requirements Traceability Figure 1. Document Details Pane for an Excel Document Use the Worksheet variable to specify that you want to capture traceability information from one or more specific worksheets in an Excel document. Enter the names of the sheets, separated by commas, in the Value column. You can perform traceability analysis on Excel documents by capturing traceability information from worksheets in an Excel document or by creating references in the Graphical View in Requirements Gateway. Capturing Worksheets from an Excel Document You can capture traceability information from an Excel document if the text in a worksheet contains the correct syntax and layout for requirements and references. Coupling Microsoft Excel with NI Requirements Gateway 2 ni.com
Requirements For the default Excel type, requirements must be located in the first, second, and third columns of a worksheet. The first column contains the requirement identifier REQxx, where xx represents digits. The second column contains the requirement label. The third column contains the requirement text. References For the default Excel type, references can appear in any Excel column but must use the syntax [Covers: reqid], where reqid is the requirement identifier. A reference statement can list multiple requirements separated by commas (,) or semicolons (;). For example, the reference [Covers: REQ1, REQ2, REQ3] covers three requirements. Creating References from Requirements Gateway Intermediate File You can use the Graphical View to create references between a requirement and an Excel document or element of an Excel document. Refer to the NI Requirements Gateway Help for more information about creating references using the Graphical View. After you create a reference, you can click the Coverage Analysis View tab and select the covering document or element in the Selection column. The Upstream Coverage Information column shows all the requirements that the selected document covers. For references that you created in the Graphical View, Requirements Gateway identifies the covered requirements with an internal creation reference attribute. The Excel type captures the content of worksheets in an Excel file and generates an ASCII intermediate file that contains the worksheet names, column numbers, and cell values. The intermediate file uses the vertical line ( ) character to specify the start of each new cell, followed by a number to indicate the column. The intermediate file indicates table rows by starting a new line of text. National Instruments Corporation 3 Coupling Microsoft Excel with NI Requirements Gateway
Figure 2 shows an example of an Excel worksheet named Requirements, in which: The first column contains the requirement IDs The second column contains the requirement titles The third column contains the requirement text The fourth column contains values for a Priority attribute The fifth column contains values for an Allocation attribute Figure 2. Excel Source File Figure 3 shows the intermediate file generated for the source document. Figure 3. Excel Intermediate File Coupling Microsoft Excel with NI Requirements Gateway 4 ni.com
Creating Custom Excel Types Selecting a Conversion Tool The organization and format of a worksheet can vary and does not always adhere to the format that the default Excel type requires. You can create a custom type for capturing information from Excel documents with alternate formatting for traceability information by duplicating the default Excel type and modifying the duplicate. Refer to Chapter 5, Customizing Types, of the Getting Started with NI Requirements Gateway manual and Chapter 2, Customizing Types and Type Elements, of the NI Requirements Gateway Customization Guide for more information about creating custom types. When you create a custom Excel type, you must select a conversion tool from the Convert tool ring control on the Analysis tab of the Types pane of the Configuration dialog box. The intermediate file that a custom Excel type generates must conform to the format that the conversion tool expects. You can select from the following conversion tools: Excel Uses tabs to delimit columns in the intermediate file. ExcelWithColNumbers Uses the vertical line ( ) character and the column number to delimit columns in the intermediate file. The default Excel type uses this conversion tool. ExcelX Same as the ExcelWithColNumbers conversion tool, but used to convert information from Excel 2007 (.xlsx) files. National Instruments, NI, ni.com, and LabVIEW are trademarks of National Instruments Corporation. Refer to the Terms of Use section on ni.com/legal for more information about National Instruments trademarks. Other product and company names mentioned herein are trademarks or trade names of their respective companies. For patents covering National Instruments products/technology, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your media, or the National Instruments Patent Notice at ni.com/patents. 2009 National Instruments Corporation. All rights reserved. 372692A-01 Jan09