How can i make xlsread read successive excel worksheets ?
2 次查看(过去 30 天)
显示 更早的评论
I have a problem reading data from successive excel worksheets within a loop... The size of data in successive sheets are different, when I type the size of stored matrix ... it always shows the size of data in first worksheet ... why ?
2 个评论
Jan
2018-6-30
Post your code, such that we can know, what you are actually doing. What does "when I type the size of stored matrix" mean exactly?
采纳的回答
Image Analyst
2018-6-30
Use
fileName = 'myExample.xlsx'
[status,sheets,xlFormat] = xlsfinfo(fileName )
to get the sheet names, then use xlsread() to open them
for k = 1 : length(sheets)
data = xlsread(fileName, sheets{k});
% Now do something with data....
end
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!