load a folder of excel files

5 次查看(过去 30 天)
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)

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by