I have written a script that reads in data from an excel file into a 4×27 matrix and then performs all the relevant analysis I need and displays results in the command window. I am happy with the script, but I have large amounts of data to run through.
All the data is in the identical form (a 4×27 matrix) but it has to be copied and pasted from a webpage into the excel sheet. At the moment I am running the script for seperate excel sheets, but would like to copy and paste multiple data sets into the excel sheet and run the script once to get all the data.
i.e. the script currently reads in rows like:
data1
data1
data1
data1
then I have to manually create another excel file/overwrite the existing file to create more data. I want it to deal with:
data1
data1
data1
data1
data2
data2
data2
data2
etc……
I feel that since I have already read the script to deal with each dataset as i desire, this shouldn't be a hard task to perform if I use loops well. I just have an almost non-existent knowledge of how to use loops.
I was hoping people could point me in the right direction.
Any help would be great thanks.
———————EDIT 1———————————-
The code I have written has now been added in the edit, as has an example of a dataset that the code reads in (i uploaded it as .xls whilst on my computer i use .xlsx)
I want the improved script to do the same job, but on an excel sheet containing multiple datasets.
——————————EDIT 2————————————
I have now uploaded a xls file of the form I wish the script to tackle. The spacing between datasets is arbitrary, and can be changed depending if it makes the job easier.
Best Answer