% Load example model
open_system('sltestExcelExample');
% Create new test file
tf = sltest.testmanager.TestFile('C:\MATLAB\input_test_file.mldatx');
% Get test suite object
ts = getTestSuites(tf);
% Get test case object
tc = getTestCases(ts);
% Add the example model as the system under test
setProperty(tc,'Model','sltestExcelExample');
% Add Excel data to Inputs section% Excel file has three sheets, creating three inputs
input_path = fullfile(matlabroot,'toolbox','simulinktest',...'simulinktestdemos','sltestExampleInputs.xlsx');
input = addInput(tc,input_path);
% Map the input signals by block name for the first two inputs
map(input(1),0);
map(input(2),0);
% Remove the third input, a blank sheet
remove(input(3));