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
 Accessing neighbour column

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
mrandersb Posted - 06/29/2011 : 07:59:17 AM
origin 8 sr0:

Hello i'm accessing a column by its column letter and range notation(in my case column "D"). I need to include data from the column next to it. They are not ordered by the column letters, so I need to get what column index column "D" has, so i can access it by ColIndex("D")+1.

i thougt that the wks.col(D).index was the command i needed, but i always get a command error when calling that.

Anybody has a solution?
4   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 07/01/2011 : 6:54:40 PM
Column level Index property was added in Origin 8 SR5, so if you get the latest SR for Origin8, you should be able to get this support.

CP
couturier Posted - 07/01/2011 : 2:26:04 PM
Sorry, didn't see that you are running 8 sr0.
Not sure the .index property was introduced yet in this version.

you can type cc1.=; and see what properties you get
mrandersb Posted - 07/01/2011 : 07:08:11 AM
I use a rane like this

range cc1 = [test2$]Sheet1!col(%1);

i know the range exist, because when i call cc1[1] i get what is in that column in row one. But i get the error:

CC1.INDEX: object property not found!
Error: --
LabTalk expression error: 2
AA=--

when calling

aa = $(cc1.index);
aa=;

in my script
couturier Posted - 06/30/2011 : 11:00:40 AM
You have to use range notation before using the index property. The following should work:

range aa=D;
range bb=$(aa.index+1);

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