Contents Previous Next Subchapters

Getting Excel Worksheet Names
Syntax xlsheets(file)
See Also xlread , read4 , bread

Overview
Gets the names of the worksheets in the given Excel file, file. The argument file must be a character row vector specifying a valid Excel file. The result from xlsheets is an NR by NC character matrix, where NR is the number of worksheets in file and NC is the length of the longest worksheet name in file.

Example
If you have an Excel file, xlsheets.xls that contains seven worksheets and looks like

and you enter,
     xlsheets("xlsheets.xls")
O-Matrix will respond
Fri$
Mon$        
Sat$        
Sun$        
Thurs$      
Tue$        
Wed$ 

Notes
Excel stores sheet names with the dollar character appended to the end of the name. When passing sheet names to the xlread function you may omit this character if desired.