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
 Worksheet 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
kemeyer Posted - 07/28/2009 : 4:36:27 PM
Origin Ver. 7 and Service Release (Select Help-->About Origin):
Operating System:XP

Hi,

I am trying to set new columns I add in as either X or Y. I found the command Worksheet -t colRef colType to do so, but it requires a number for column type. As my program is set up, users can enter various column names at different times, so I won't be able to know where column Label1 is positionwise. Is there a way to return the number value of a column of colName? I wasn't able to find anything, so instead I tried to do this:

for(i=1; i<=%(%C,@#); i+=1){
if(%(i,@C); == "Label1")
colNum=i;
}

I used this to try and figure out the column number, but for whatever reason when I add the columns with the wks.addCol command, %%C,@#)evaluates to 2 rather than the 3 that there is. Why is that?
1   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 07/28/2009 : 5:01:20 PM
Hi,

You can get index from short name using:

%a="shortname";
colnum(%a)=;


This also works in new version 8.0, but in 8.0 one can also get the index even using long name such as:

range r=col("system pressure");
r.index=;


Easwar
OriginLab

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