I have the following cell array which is a list of some (but not all) of the tab names in an excel file:
chosenTabs =
'Screen' 'SectorAbsolute' 'SectorRelative'
How do I get it to read off each tab of the excel sheet according to what is on this list and return a table of the tab's contents? The new tables should have the same name as the tab that is read.
I have tried (for example to create a table called 'SectorAbsolute' containing the contents of the tab 'SectorAbsolute'):
char(chosenTabs(2))=readtable(inputFile,'Sheet',char(chosenTabs(2)))
but this returns the error:
You can not subscript a table using only one subscript. Table subscripting requires both row and variable subscripts.