How do I import a number of excel files at once?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Franchesca
am 21 Apr. 2014
Bearbeitet: Mischa Kim
am 21 Apr. 2014
I have wrote this loop to import a number of excel files at once and it works:
numfiles = 54; % number of excel files mydata=cell(numfiles,1); % defining size of mydata
for k = 7:numfiles % loop to import mutliple excel files
myfilename = sprintf('Trial %d', k); % define file name
mydata{k} = xlsread(myfilename); % import files into mydata
end
How do I edit this to only import columns 1 to 5 in each excel file??
0 Kommentare
Akzeptierte Antwort
Mischa Kim
am 21 Apr. 2014
Bearbeitet: Mischa Kim
am 21 Apr. 2014
Use
xlsread(myfilename,'A:E')
or any other range of data columns.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!