I have a large number of excel spreadsheets and want to extract data for comparisons and graphs. I don't want to generate more saved files, but I do want to load the information from each file into the workspace for manipulation. I'm getting each set of data using a loop. Once I have it, I need to rename the table so that when I loop around for the next set of data it isn't overwritten. I'd like to use a name from a list of identifiers (RodList) which I've moved to a string as "rodname". I'm sure there is a simple way to do this…I'm a newbie…any help would be much appreciated!
for next = 0:0 nextfile = RodList(next + 1); % index to next rod in the list
sourcedir = 'C:\Users\rnm\Scans\'; sourceext = '.xlsx'; rodname = strcat(nextfile) Filetoprocess = strcat(sourcedir,nextfile,sourceext); FileData0deg = readtable(Filetoprocess{:},'Sheet','Sheet1','Range','D1:E5000'); FileData0deg = rmmissing(FileData0deg); _ _I need to keep FileData0deg in the workspace as rodname_FileData0deg__ end
Best Answer