How to move files from current folder to workspace automatically?
Ältere Kommentare anzeigen
How to make this automatically when I select path of the file (Browse for folder) move all tables to Work space?
EX:
I wanna make these files moved automatically to workspace.

Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 17 Mai 2020
0 Stimmen
You can use uigetfile() to get the folder name. Then you can use dir() to find the xlsx files in the folder. Then you can loop using readtable() and assigning the result into a cell array, or perhaps into a struct... you could even make a table of tables, I suppose.
However, we advise that you do not create new variable names corresponding to each file. http://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamically-eval
Kategorien
Mehr zu File Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

