フィルターのクリア

How do I import a number of excel files at once?

1 回表示 (過去 30 日間)
Franchesca
Franchesca 2014 年 4 月 21 日
編集済み: Mischa Kim 2014 年 4 月 21 日
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??

採用された回答

Mischa Kim
Mischa Kim 2014 年 4 月 21 日
編集済み: Mischa Kim 2014 年 4 月 21 日
Use
xlsread(myfilename,'A:E')
or any other range of data columns.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by