Origin Version (Select Help-->About Origin): 7.5 Operating System: XP
I have the following script which carries out various changes to my particular worksheet. I've had a look through the forums and help menus but am still struggling with the following simple questions:
Firstly, how do I carry out the initial sort function on the active worksheet as opposed to having to name it each time?
Secondly, I have imported roughly 200 worksheets on which I want to apply the script. The difficulty I am having is putting in a loop command so that I do not have to carry it out one at a time.
The script is as follows:
sort.wksname$ = test1; sort.c1 = 0; // all columns sort.r1 = 1; // from row 1 to sort.r2 = 1314; // row 1314, sort.cname1$ = A: A; // using column A as the primary, sort in ascending order sort.wks(); // execute sort;
mark -d col(A) -b 1315 -e 1315; mark -d col(A) -b 2 -e 1169;
del col(B); del col(E); del col(F);
worksheet -a 1; // Add 1 columns to the active worksheet