Info

This question is closed. Reopen it to edit or answer.

xlsread function does not concatenate all files into one big matrix as expected

1 view (last 30 days)
Hello,
I am working with a few .xlsx files which I want to concatenate into one, big matrix. Attached you find examples of 4 files and below you have the piece of code I am currently playing with:
folder='D:\Documents\...'; % my folder
filetype='*_pilot_trivia.xlsx';
f=fullfile(folder,filetype);
d=dir(f);
all_participants = [];
for k=1:size(d,1); % using 'numel' instead of 'size' doesn't help
all_participants = xlsread(fullfile(folder,d(k).name));
end
Basically what happens is that everything goes smoothly except the fact that only one specific file out of the entire list gets loaded (i.e. only 9_pilot_trivia.xlsx appears in all_participants in the end) and I don't know why. Could you please be so kind as to help?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!