readtable
Read tabular data from a file into a table.
Syntax
Section titled “Syntax”T = readtable(filename)T = readtable(filename, opts)T = readtable(filename, 'Name', value, ...)Description
Section titled “Description”Reads delimited text files (.csv, .txt, .tsv), Excel files (.xls, .xlsx), and other tabular formats and returns the contents as a table. Options control delimiters, header rows, encoding, and column types.
Examples
Section titled “Examples”T = readtable('data.csv')T = readtable('data.txt', 'Delimiter', '|')