Main Content

Link Directly to Requirements in Microsoft Excel

You can create direct links from requirements managed in Microsoft® Excel® to items in MATLAB® and Simulink®. You can use the links and backlinks inserted in Excel to navigate from the requirements to the design or to tests.

Alternatively, you can import requirements from Microsoft Excel into Requirements Toolbox™. For more information, see Differences Between Importing and Direct Linking.

Note

  • You can create direct links to requirements in Microsoft Excel only on Microsoft Windows® platforms.

  • MATLAB Online™ does not support linking to requirements in Microsoft Excel documents.

Link and Navigate to Requirements in Excel from Simulink blocks

This example shows how to link requirements authored in Microsoft Excel to Simulink blocks and how to navigate between the requirements and the design by using direct links and external backlinks.

Open the slvnvdemo_fuelsys_officereq model.

open_system("slvnvdemo_fuelsys_officereq");

Open the slvnvdemo_FuelSys_TestScenarios.xlsx requirements document.

winopen("slvnvdemo_FuelSys_TestScenarios.xlsx")

Configure Selection Link Settings

First, ensure that Requirements Toolbox™ can link to Excel documents and that bidirectional linking and external connectivity are enabled.

  1. In Simulink, in the Apps tab, click Requirements Manager.

  2. In the Requirements tab, ensure Layout > Requirements Browser is selected.

  3. In the Requirements pane, in the View drop-down menu, select Links.

  4. In the Requirements tab, click Link Settings > Linking Options. The Requirement Settings dialog opens.

  5. In the Selection Linking tab, next to Enabled applications, ensure that Excel is selected.

  6. Ensure that Document file reference is set to filename only (on MATLAB path).

  7. Under When creating selection-based links, select Modify destination for bidirectional linking and Store absolute path to model file. Ensure that Use ActiveX for incoming links (backward compatibility) is cleared.

  8. Ensure that Enable external connectivity at MATLAB startup is selected.

  9. Click Close.

rmi_dlg_settings.png

Link to a Selection in Microsoft Excel

In the slvnvdemo_FuelSys_TestScenarios Excel file, select the requirement 1.2.1.6 Speed Sensor Failure in cell B22.

requirementB22.png

At the top level of the slvnvdemo_fuelsys_officereq model, right-click the speed sensor block and select Requirements > Link to selection in Excel to create the link.

speedSensor.png

Navigate Between Simulink and Excel

To navigate from the speed sensor block to the requirement in Excel, right-click the block and select Requirements > 1. "1.2.1.6 Speed Sensor Failure".

To navigate from the requirement in Excel to the speed sensor block, click the backlink icon backlink.gif.

speedSensorBacklink.png

If your Excel file does not contain a backlink, you can update the backlinks for the link set. For more information, see Manage Navigation Backlinks in External Requirements Documents.

See Also

Related Topics