load a folder of excel files

2 Ansichten (letzte 30 Tage)
Kamyar Mazarei
Kamyar Mazarei am 10 Jun. 2021
Kommentiert: Stephen23 am 11 Jun. 2021
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?

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by