| T O P I C R E V I E W |
| CHE-TR01 |
Posted - 03/13/2006 : 2:07:19 PM 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
col(B)=ln(col(C)/col(D)); // Take natural log
Any help would be greatly appreciated,
Thanks,
Richard
|
| 1 L A T E S T R E P L I E S (Newest First) |
| Laurie |
Posted - 03/13/2006 : 2:32:34 PM %H is a system string variable that returns the name of the active window, so you can use that in place of "test1".
The document command can be used to loop through all worksheet windows. You can then put your script inside the doc -e W { } command.
OriginLab Technical Support |
|
|