MATLAB: Is there a way to automatically import requirements from a spreadsheet as a hierarchy in Simulink Requirements Editor

childhierarchyparentRequirementsSimulink Requirementsspreadsheet

Best Answer

Unfortunately, there is no built-in support for automatically importing the requirements as parent and child requirements for a spreadsheet.
To be able to define parent and child requirements successfully, you can import the spreadsheet into MATLAB and then create the required hierarchy using the available APIs in Simulink Requirements.
To read-in the Excel file contents, please use the "readtable" function in MATLAB. Please find the details about this function in the following link:
After reading the data, you can use the "add" method in slreq.ReqSet and slreq.Requirement to build the needed hierarchy. For more details, please visit the following links: