%% Importing Test Data from Microsoft Excel
%
% Test a model using inputs stored in Microsoft(R) Excel(R). 

% Copyright 2015-2019 The MathWorks, Inc.

%%
% This example shows how to create a test case in the Test Manager 
% and map data to the test case from a Microsoft(R) Excel(R) file.
% Input mapping supports Microsoft Excel spreadsheets 
% only for Microsoft Windows(R).

%% Create a Test File
% 1. Open the Test Manager. Enter
%%
%   sltest.testmanager.view

%%
% 2. In the test manager toolbar, select *New > Test File*. Save the file
% to a writable directory. The test manager creates a test file with an
% empty baseline test case.
%
% 3. In the test browser, select the test case. In the test editor, under
% the *System Under Test* section, enter |sltestExcelExample|.
%
% <<../sltest_excel_input_example_newfile.png>>

%% Configure the External Inputs.
%

%%
% 1. Expand the *Inputs* section of the test case. 

%%
% 2. To include the input data in the test results, click *Include input 
% data in test result*.

%%
% 3. Under the *External Inputs* table, click *Add*.

%%
% 4. In the *Add Input* dialog box, for *File*, select the
% |sltestExampleInputs.xlsx| from the
% current directory.
% This file contains two tabs, named |Acceleration| and |Braking|. Each tab
% represents a complete set of inputs for a single simulation.

%%
% 5. In the *Add Input* dialog box, 

%%
% * Select the *Acceleration* sheet from the sheets table.
% * Select *Mapping Mode* : |Block Name|.
% * Click *Map Inputs*.
% * Click *Add*.
%%
%
% <<../sltest_excel_input_ex_addinput.png>>
%%
% The *Mapping Mode* controls the method used to map data from the Microsoft Excel sheet to 
% root-level Inport blocks in the model. For more information, see
% <docid:sltest_ug#bu0mksg Run Tests Using External Data>.

%%
% The test case shows the inputs mapped.
%%
%
% <<../sltest_excel_input_ex_mapped.png>>
%% Run the Test
%
% 1. In the toolbar, click *Run*.
% 
% 2. In the *Results and Artifacts* pane, you can plot signals from the
% external inputs or the simulation output.

%%
%
% <<../sltest_excel_input_example_plots.png>>


%%
