Effacer les filtres
Effacer les filtres

load a folder of excel files

5 vues (au cours des 30 derniers jours)
Kamyar Mazarei
Kamyar Mazarei le 10 Juin 2021
Commenté : Stephen23 le 11 Juin 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?

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by