Putting the content of an array cell into an xlsread command.
Ältere Kommentare anzeigen
I am trying to create a 'for loop' to cycle through all of the worksheets in an excel workbook. I created a column array with the exact names of all of the worksheets.
Here is my attempt to do this:
worksheets = {'Aaa'; 'Bbbbbbbbbb'; 'Ccccccc'...etc}
for i=1:10
WSName = worksheets(i,1)
Matrix = xlsread('C:\documents\workbook', sprintf('%s', WSName))
end
Can anyone tell me how to fix this to make it work? Is it possible?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!