load a folder of excel files

4 visualizaciones (últimos 30 días)
Kamyar Mazarei
Kamyar Mazarei el 10 de Jun. de 2021
Comentada: Stephen23 el 11 de Jun. de 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?

Respuesta aceptada

KSSV
KSSV el 10 de Jun. de 2021
excelFiles = dir('*.xlsx') ;
N = length(excelFiles) ;
for i = 1:N
file = excelFiles(i).name ;
T = readtable(file) ;
% do what you want
end
  2 comentarios
Kamyar Mazarei
Kamyar Mazarei el 11 de Jun. de 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 el 11 de Jun. de 2021
"the T gives me a table, can i turn it into a matrix?"

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by