load a folder of excel files

5 visualizzazioni (ultimi 30 giorni)
Kamyar Mazarei
Kamyar Mazarei il 10 Giu 2021
Commentato: Stephen23 il 11 Giu 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?

Risposta accettata

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

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by