So I have a lot of .xlsx files (I have attached one here). I need to take the data from column 7 (Heart Rate), from a specific number of rows (in THIS case, from row 1944 till row 2730) and input this data in the form of a row in a new Excel spreadsheet. I need to repeat this process for the rest of my xlsx files and store their 7th columns into the same new Excel spreadsheet. Is there a way to automate this process, keeping in mind that these different .xlsx files may have a different number of rows to be stored?
Below is the code I've used to import one of my .xlsx files into MATLAB. I have also attached the respective .xlsx file.
[~,NumDataS]=xlsread('Oxygen_6.10.19_Dex_0024_vitals.xlsx','Sheet2','F1944:G2730'); % Physiological Data
[~,TmatrixS] = xlsread('Oxygen_6.10.19_Dex_0024_vitals.xlsx','Sheet2','A1944:F2730'); % Time Data
HR = cellfun(@str2double, NumDataS(:,2)); % Retrieve From Cell Array Of Strings
Time1=cellfun(@str2double, TmatrixS(:,5));%Array of minutes to be converted to seconds