
Using the specified column range, the import function automatically detects the row extent by reading from the first nonempty row to the end of the data or the footer range. Using the specified row range, the importing function automatically detects the column extent by reading from the first nonempty column to the end of the data, and creates one variable per column.Īlternatively, specify the range by identifying the beginning and ending columns using Excel column letters or numbers. Specify the range by identifying the beginning and ending rows using Excel row numbers. The number of columns must match the number specified in the NumVariables property.

Any empty fields within the specified range are imported as missing cells. The importing function only reads the data contained in the specified range.

Specify the exact range to read using the rectangular range form, where Corner1 and Corner2 are two opposing corners that define the region to read. Using the specified row index, the importing function automatically detects the extent of the data by reading from the specified first row to the end of the data or the footer range. Using the starting cell, the importing function automatically detects the extent of the data, by beginning the import at the start cell and ending at the last empty row or footer range.Īlternatively, specify the first row containing the data using the positive scalar row index. For example, A5 is the identifier for the cell at the intersection of column A and row 5. Specify the starting cell for the data, using Excel ® A1 notation. The fifth variable, for the import operation.Įxample: T = readtable(filename,opts) returnsĪ table containing only the variables specified in the SelectedVariableNames propertyĭata Types: uint16 | uint32 | uint64 | char | string | cell = selects only two variables, the first variable and To support invalid MATLAB identifiers as variable names, such as variable namesĬontaining spaces and non-ASCII characters, set the value ofĮxample: opts.SelectedVariableNames = selects Using the SelectedVariableNames property and use readtable to import only that subset. Use the SelectedVariableNames property to Which means that all variables are imported. The variable names from the VariableNames property, Names contained in the VariableNames property.īy default, SelectedVariableNames contains all

SelectedVariableNames must be a subset of Subset of variables to import, specified as a character vector, string scalar, cell array ofĬharacter vectors, string array or an array of numeric indices.
