Effacer les filtres
Effacer les filtres

Import csv files with sequential names

2 vues (au cours des 30 derniers jours)
David du Preez
David du Preez le 14 Fév 2018
Modifié(e) : Jan le 14 Fév 2018
I have several csv files with the following names:
and so on for an entire year.
I want to import row 25 - 55 and only column A and D. I know it is possible to do one file would like to do all at once.

Réponse acceptée

Jan le 14 Fév 2018
Modifié(e) : Jan le 14 Fév 2018
See FAQ: Import sequence of files . You cannot import "all files at once", but you import one after the other in a loop.
Folder = 'C:\You\Folder';
DirList = dir(fullfile(Folder, '*.SAWS'));
for iFile = 1:numel(DirList)
File = fullfile(Folder, DirList(iFile).Name);
... import the contents of the file and do what you want

Plus de réponses (0)


En savoir plus sur Data Import and Export 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!

Translated by