The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Move columns
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Martur

Sweden
4 Posts

Posted - 10/20/2010 :  05:31:07 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

VincentLiu

China
Posts

Posted - 10/20/2010 :  11:18:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - VincentLiu on 10/20/2010 11:20:22 PM
Go to Top of Page

Tackle

China
6 Posts

Posted - 10/20/2010 :  11:27:46 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Martur

Sweden
4 Posts

Posted - 10/21/2010 :  04:40:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

VincentLiu

China
Posts

Posted - 10/22/2010 :  03:13:19 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000