Вот одна из возможных реализаций:
%# get all XLS files in source directory
dirName = '.\in';
files = dir( fullfile(dirName,'*.xls') );
files = {files.name}'; %'
%# for each input file
for i=1:numel(files)
fname = fullfile(dirName, files{i}); %# absolute-path filename
[~,f] = fileparts(fname); %# used to name sheets in output
%# loop over each sheet in input file
[~,sheets] = xlsfinfo(fname);
for s=1:numel(sheets)
%# read content
[~,~,rawData] = xlsread(fname, sheets{s});
%# write to output file as new sheet
xlswrite('out.xls', rawData, [f '_' sheets{s}]);
end
end