Preview eight rows from file using import options
returns a table containing the first eight rows of data in
T
= preview(filename
,opts
)filename
, using the import options opts
.
The value of the SelectedVariableNames
property of
the import options object opts
selects the variables
that appear in the table T
.
The preview function returns a subset of the data that the
readtable
function returns with the import
options object opts
.
Usually, the output of the preview
function
contains eight rows of data. However, in some instances the number of
rows differs depending on property values defined in the import options
object opts
. For more details see, Tips.
The preview
function returns fewer than eight rows in
these cases:
When the file contains fewer than eight rows of data.
When the DataLines
or the
DataRange
properties of the
opts
object specify less than eight
rows.
When a combination of the properties of the
opts
object result in less than eight rows of
data. For example, preview
returns less than
eight rows when the value of the EmptyLineRule
,
ImportErrorRule
or the
MissingRule
of the opts
object causes the importing function to omit data.
When the DataLines
or the DataRange
property of the opts
object specifies multiple row ranges and
the first row range spans fewer than eight rows, then preview
returns the rows from the first row range followed by rows from successive row
ranges until it reaches a total of eight rows.
detectImportOptions
| getvaropts
| readtable
| setvaropts
| setvartype