Skip to content

xlsread

io · scripts/io/xlsread.m

XLSREAD  Read a spreadsheet file (MATLAB compatible).

  NUM = XLSREAD (FILE), [NUM, TXT, RAW] = XLSREAD (FILE, SHEET, RANGE)

  Compatibility wrapper matching MATLAB R2026a signatures and outputs.
  Spreadsheet workbooks are read with the same native OOXML/.xls backend
  that readmatrix uses; delimited .csv/.txt/.dat files go through
  readmatrix.  NUM holds numeric cells (leading/trailing rows and columns
  without numbers are dropped; other non-numeric cells are NaN), TXT the
  text cells ('' elsewhere) and RAW every cell of the range (NaN for empty
  cells).  Dates are returned as Excel serial numbers.

  Old binary .xls workbooks (BIFF5 and BIFF8) are read natively too.
  .xlsb is not supported.