MATLAB: Calling specific sheet of excel after importdata

importdata from excel

Hi I have a excel file with around 20 sheets. I am importing data using mydata = importdata('myfile.xlsx') ;
Now mydata is a structure. This has two substructures; data and textdata. Using mydata.data I am able to get the sheets which are present in the excel file. I want to run a loop such that I can call the specific sheet from mydata.data . Is there any way to do this?
Thanks in advance
Sreenu

Best Answer

Hi Oleg Komarov, thanks for the reply.
I have many sheets in excel file and every time I want to use a particular number in every sheet. So I have to import all the sheets and run a loop. SO importdata is useful for me. I got to know how to call a particular sheet by indexing it. The following piece of CODE worked:
[type, sheets] = xlsfinfo('myfile.xlsx') ;
present = myfile.data.(char(sheets(i))) ;
Sreenu
Related Question