I have a number of excel sheets I would like to cycle through enclosed in a for loop, with sheet name a through A to X. Is this possible?
I tried this:
for letter='A':'X'
[num,txt,raw] = xlsread('Grouting_sum_final.xlsx','%s',letter);
% Lots of code below here (not relevant for the problem)
end
Yes, it is, but you do not need the '%s' part of your line.
If you go to the documentation website, you will find that you have to pass as first argument the excel file name and as second the sheet name.
So your code should read something like:
for letter='A':'X'
[num,txt,raw] = xlsread('Grouting_sum_final.xlsx',letter);
% Lots of code below here (not relevant for the problem)
end
Also, I am assuming you are aware that you keep on overwriting your data retrieved from the Excel sheet.