addExcelSpecification
Add a Microsoft Excel sheet to baseline criteria or test case inputs
Syntax
Description
Examples
Create the test file, test suite, and test case structure.
tf = sltest.testmanager.TestFile('Add Excel Test'); ts = createTestSuite(tf,'Add Excel Suite'); tc = createTestCase(ts,'baseline','Baseline Excel Test Case');
Add baseline criteria from an Excel file. Specifying two sheets creates two baseline criteria.
base = addBaselineCriteria(tc,'C:\MATLAB\baseline.xlsx','Sheets',{'Optics','Converter'});
Add the sheet X2Out to the first set.
base(1).addExcelSpecification('Sheet','X2Out');
Show the contents of the Sheet property of the
Excel specifications for each
baseline criteria. The first set now includes the X2Out
sheet.
base(1).ExcelSpecifications(:).Sheet base(2).ExcelSpecifications(:).Sheet
ans =
'Optics'
ans =
'X2Out'
ans =
'Converter'Input Arguments
Object to which to add Excel sheet or cell data, specified as a baseline criteria or test case input object.
Excel sheet to add to baseline criteria or test case inputs, specified as a character vector.
Example: 'Optics'
Range of cells from the specified sheet to add to test case inputs, specified as a character vector or string in one of these forms:
Ways to specify Range
| Description |
|---|---|
Rectangular Range | Specify the range using the syntax
Example:
|
Unspecified or Empty | If unspecified, the importing function automatically detects the used range. Example:
Note: Used Range refers to the rectangular portion of the spreadsheet that actually contains data. The importing function automatically detects the used range by trimming leading and trailing rows and columns that do not contain data. Text that is only white space is considered data and is captured within the used range. |
Row Range | You can identify the range by specifying the
beginning and ending rows using Excel row designators. Then
Example:
|
Column Range | You can identify the range by specifying the
beginning and ending columns using Excel column designators. Then
Example:
|
Excel Named Range | In Excel, you can create names to identify ranges
in the spreadsheet. For instance, you can select a
rectangular portion of the spreadsheet and call it
Example:
|
Example: 'A1:C20'
Version History
Introduced in R2017b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)