How concatenate all the excel filles in one table in MATLAB

조회 수: 1 (최근 30일)
Ayman Mounir
Ayman Mounir 2020년 12월 11일
댓글: Ayman Mounir 2020년 12월 11일
I have many excel files in a folder, I want to concatenate them in one table in MATLAB.
Hint: if i am going to use vercat( readtable('file_name') ); i have to write all the files names this is the issue.
Thanks in advacne

채택된 답변

Mathieu NOE
Mathieu NOE 2020년 12월 11일
hi
this is an example
folder = cd;
folderout = [cd '\out'];
Files = dir(fullfile(folder, '*.xlsx')); % Use absolute path names
for ci = 1:length(Files);
data_file = readmatrix(Files(ci).name,'NumHeaderLines',15);
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by