T O P I C R E V I E W |
Martur |
Posted - 10/20/2010 : 05:31:07 AM Origin 8.1
How can I move a column within a worksheet by several hops? In a 60 column worksheet I added a new column that was applied to the end. Now I need to have it pretty much in the middle of the sheet. So far I found only the option to move it one column at a time.
Martin |
4 L A T E S T R E P L I E S (Newest First) |
VincentLiu |
Posted - 10/22/2010 : 03:13:19 AM Hi Martur,
We will add a LabTalk property to set the position of the worksheet column. This new feature will be available in our next release version. 8.5.0 SR1. After that, one can do this like:
range ra = col(A);// Define a range notation ra.index = 4; // move the column as the 4th column Vincent OriginLab Technical Support
|
Martur |
Posted - 10/21/2010 : 04:40:30 AM Thank you for your answers.
@VincentLiu: I like the solution with "insert". Why couldn't they call it something more obvious...?
@Loveth15: I found the format cells option when right clicking into a cell (not when selecting the column) but how would I move the column then?
Martin |
Tackle |
Posted - 10/20/2010 : 11:27:46 PM Origin Ver. 7.5and Service Release (Select Help-->About Origin): Operating System:Win 7 Hello£º thank you in advance,Vicent. Now I have 2 columns,one column X£¨A£© and one Y£¨B£©, Col A is time, Col B is concentration, and firstly, I want to subtract their first rows respectively( Col(A)=Col(A)-Col(A)[1];Col(B)=Col(B)-Col(B)[1]£©£»Secondly, I want to add 2 Y columns(C,D), and set Col(C)=Col(A)*Col(B), Col(D)=Col(A)*Col(C); Lastly, I want to get 3 integrals: the integral of Col(B) with Col(A); the integral of Col(C) with Col(A); the integral of Col(D) with Col(A) .The 3 integrals are just what I want to obtain .Then ,how can I realize these commands in "window script"? May anyone offer exact scripts?If these are too complicated to realize,how can I get integrals when I have already set the 4 columns?I saw "loop(i,2,4) {integ1 (col(1), col($(i))); };", but I when I copy it in the window script and press (enter),I can only get"command error" Thank you ! Tackle |
VincentLiu |
Posted - 10/20/2010 : 11:18:02 PM You could use a loop with the function colmove in LabTalk script to move the column. For example, if the column G is the last column in your worksheet and you want to move it back for 3 columns. You could directly use the following script in the command window to realize it.
loop(i,1,3) {colmove r:=col(G) operation:=left;}
Or you could directly insert a column instead of adding a column into a worksheet, which will not need to move the column from the end to the middle of the worksheet.
Vincent OriginLab Technical Services
|
|
|