Get sheet names from spreadsheet file
Get the name of all worksheets from the spreadsheet file
sheets = sheetnames('airlinesmall_subset.xlsx')
sheets = 13x1 string "1996" "1997" "1998" "1999" "2000" "2001" "2002" "2003" "2004" "2005" "2006" "2007" "2008"
filename— Name of file to read
Name of the file to read, specified as a character vector or a string scalar.
Depending on the location of your file,
filename can take one of
|Current folder or folder on the MATLAB® path|
Name of the file.
Other local folder
Full or relative path to the file.
Full path to the file, specified as a uniform resource locator (URL) of the form:
Based on your remote location,
For more information, see Work with Remote Data.
On Windows® systems with Microsoft®
Excel® software, the
sheetnames function supports:
.xls, .xlsm, .xlsx, .xltm, .xltx, .xlsb, and .ods.
If your system does not have Excel for Windows, then
sheetnames supports only:
.xlsx, .xlsm, .xltx, and .xltm files.