load a folder of excel files

조회 수: 2 (최근 30일)
Kamyar Mazarei
Kamyar Mazarei 2021년 6월 10일
댓글: Stephen23 2021년 6월 11일
hi
i have 146 excel files in a folder and want to load them all
i dont want to go through import window everytime, so is there a way to load all at once?

채택된 답변

KSSV
KSSV 2021년 6월 10일
excelFiles = dir('*.xlsx') ;
N = length(excelFiles) ;
for i = 1:N
file = excelFiles(i).name ;
T = readtable(file) ;
% do what you want
end
  댓글 수: 2
Kamyar Mazarei
Kamyar Mazarei 2021년 6월 11일
thank you
the T gives me a table, can i turn it into a matrix?
(the excels are all numbers not letters)
Stephen23
Stephen23 2021년 6월 11일
"the T gives me a table, can i turn it into a matrix?"

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by