loading in a folder of excel files
Show older comments
I have a folder of excel files and I want to load in all of the data from all the files into Matlab to analyze the data. There are about 50,000 files and 100 pieces of data in each. How can I get Matlab to load in all of the data at once without having to do each file manually?
4 Comments
Pieter Hamming
on 15 Aug 2018
As Stephen commented: use a for loop over all the file names. If needed, use dir(*.xlsx) to get a list of all excel files in the current directory.
Getting the data from each file is probably easiest using xlsread.
Bob Thompson
on 15 Aug 2018
xlsread with a for loop is definitely the simplest way to get the data, but you might investigate the ActiveX capability for quicker usage.
Adam Danz
on 15 Aug 2018
If you get stuck, try searching for the answer first. This task has been addressed very many times here in the forum.
Answers (0)
Categories
Find more on Data Import from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!