xlsread
Read data from an Excel (.xlsx) file.
Syntax
Section titled “Syntax”num = xlsread(filename)num = xlsread(filename, sheet)num = xlsread(filename, sheet, range)[num, text, raw] = xlsread(filename, ...)Description
Section titled “Description”Reads from an Excel workbook. With one argument, reads the first sheet. With sheet (string name or numeric index) selects a sheet. With range (Excel-style range like 'B2:D10') restricts the area read.
Three-output form returns num (numeric data only), text (cells of strings), and raw (the full mixed-type cell array).
Examples
Section titled “Examples”num = xlsread('budget.xlsx')[num, text, raw] = xlsread('data.xlsx', 'Sheet2', 'A1:E20')