Read Microsoft Excel spreadsheet file
___ = xlsread(filename,-1)
[num,txt,raw,custom]
= xlsread(filename,sheet,xlRange,'',processFcn)
reads
data from the spreadsheet in num
= xlsread(filename
,sheet
,xlRange
,'basic'
)basic
import mode.
If your computer does not have Excel for Windows®, xlsread
automatically
operates in basic
import mode, which supports XLS,
XLSX, XLSM, XLTX, and XLTM files.
If you do not specify all the arguments, use empty character
vectors, ''
, as placeholders, for example, num
= xlsread(filename,'','','basic')
.
___ = xlsread(
opens
an Excel window to interactively select data. Select the worksheet,
drag and drop the mouse over the range you want, and click OK.
This syntax is supported only on Windows computers with Microsoft Excel software
installed.filename
,-1)
[
,
where num
,txt
,raw
,custom
]
= xlsread(filename
,sheet
,xlRange
,'',processFcn
)processFcn
is a function handle, reads from
the spreadsheet, calls processFcn
on the data,
and returns the final results as numeric data in array num
.
The xlsread
function returns the text fields in
cell array txt
, both the numeric and text data
in cell array raw
, and the second output from processFcn
in
array custom
. The xlsread
function
does not change the data stored in the spreadsheet. This syntax is
supported only on Windows computers with Excel software.
xlsread
reads only 7-bit ASCII
characters.
xlsread
does not support non-contiguous
ranges.
importdata
| readtable
| uiimport
| xlsfinfo
| xlswrite