Selecting and saving data from multiple excel files?

4 views (last 30 days)
Hey! So, I have an objective I've been trying to accomplish for a few weeks now, and that is basically to load multiple excel files into MATLAB, save a selected range (which will be the same for each file) into individual text files with ascending file names (ex. TR1001,TR1002...). I have a second part to this issue but I have no clue how to start this part and will likely seek help for the second half once I figure this out. Any ideas? Any help would be appreciated! I'm somewhat new to Matlab, just thought I should note.

Answers (1)

Star Strider
Star Strider on 20 Apr 2015
Instead of saving them to text files, I would save them to .mat files, or ideally all of them to one .mat file, especially if you plan to use all of the data in in the same routine. (You can name each data set ‘TR001’ etc. as a variable name rather than a file name.) Using .mat files eliminates the problem of formatting the output and then again formatting the input. See the documentation for save, load, and matfile for details on using them.

Community Treasure Hunt

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

Start Hunting!

Translated by