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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 How to move the columns

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
A.Granzhan Posted - 09/12/2002 : 12:07:26 PM
Hello everybody...

Does anybody know how to program in LabTalk moving the columns in a workshet? I need the same action as menu command "Column -> Move to First/Last".

Thanks a lot in advance.

A. Granzhan
Universität Regensburg
2   L A T E S T    R E P L I E S    (Newest First)
A.Granzhan Posted - 09/13/2002 : 04:55:54 AM
Thanks a lot, this is what I needed.

Mike Buess Posted - 09/12/2002 : 12:33:45 PM
These scripts will move the third column of the active worksheet to the beginning or end...

# Move to First
%A=wks.col3.name$; // get the name of column 3
wo -i 0; // insert a column at the beginning
copy col(4) col(1); // copy contents of column 4 (was col 3) to the first column
del col(4); // delete column 4
wo -n 1 %A; // rename the first column

# Move to Last
%A=wks.col3.name$; // get the name of column 3
wo -i wks.ncols; // add a column at the end
copy col(3) wcol(wks.ncols); // copy contents of column 3 to the last column
del col(3); // delete column 3
wo -n wks.ncols %A; // rename the last column

Hope that helps.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 09/12/2002 4:28:04 PM

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000