obj — Object to which to add Excel sheet or cell data baseline criteria object | test case object
Object to which to add Excel sheet or cell data, specified as a baseline criteria or test
case input object.
sheet — Excel sheet to add character vector | string
Excel sheet to add to baseline criteria or test case inputs,
specified as a character vector.
Example: 'Optics'
range — Range of cells to add character vector | string
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
'Corner1:Corner2'
Rectangular
Range
Specify the range using the syntax
'Corner1:Corner2',
where Corner1 and
Corner2 are two opposing
corners that define the region. For example,
'D2:H4' represents the 3-by-5
rectangular region between the two corners
D2 and H4 on
the worksheet. The 'Range' name-value
pair argument is not case-sensitive, and uses
Excel A1 reference style (see Excel help).
Example:'Range','Corner1:Corner2'
''
Unspecified or
Empty
If unspecified, the importing function
automatically detects the used
range.
Example:'Range',''
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.
'Row1:Row2'
Row
Range
You can identify the range by specifying the
beginning and ending rows using Excel row designators. Then
readtable automatically detects
the used column range within the designated rows. For
instance, the importing function interprets the range
specification '1:7' as an instruction
to read columns in the used range in rows 1 through 7
(inclusive).
Example:'Range','1:7'
'Column1:Column2'
Column
Range
You can identify the range by specifying the
beginning and ending columns using Excel column designators. Then
readtable automatically detects
the used row range within the designated columns. For
instance, the importing function interprets the range
specification 'A:F' as an instruction
to read rows in the used range in columns A through F
(inclusive).
Example:'Range','A:F'
'NamedRange'
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
'myTable'. If such named ranges
exist in a spreadsheet, then the importing function can
read that range using its name.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.