Converting multiples excel files to .mat
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ibro Tutic
le 1 Oct 2015
Commenté : Ibro Tutic
le 6 Oct 2015
Hi all, I need to convert multiple xlsx files to .mat. The directory contains 4 folders which contain about 200 folders each which contain about 4 excel files each. How can I get MatLab to go this directory and convert every .xlsx file to .mat? I know how to do it for one file, but that doesn't help very much when I have to do it for almost a thousand files.
So far I have this:
files = dir('*.csv');
for file = files'
csv = csvread(file.name);
% Do some stuff
end
Now I need it to read every .csv file and save the data as .mat. Would this something like this work?
files = dir('*.csv');
for file = files'
csv = csvread(file.name);
save = (file.name);
end
Will this go through every folder in the directory and create .mat copies of the .csv data?
Any help appreciated.
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Spreadsheets dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!