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
 Column range based on sheet and column indices

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
AKazak Posted - 10/26/2022 : 04:15:43 AM
OriginPro 2022b (64-bit) SR1 9.9.5.167
Windows 7 Pro SP1 x64

Greetings!

I need to define a range based on known sheet and column indices stored in variables.

What is the correct syntax for doing this?

https://www.originlab.com/doc/en/LabTalk/guide/Range-Notation doesn't tell much about this case.

Thank you.

---
Andrey
6   L A T E S T    R E P L I E S    (Newest First)
AKazak Posted - 10/31/2022 : 04:16:09 AM
quote:
Originally posted by YimingChen

Have you tested the script like below? It worked for me.

range rr = 1!2:end;
rnormalize -r 2 irng:=rr;




Works great!
I think it is worth describing "1!2[3]" syntax at https://www.originlab.com/doc/en/LabTalk/guide/Range-Notation.

---
Andrey
YimingChen Posted - 10/26/2022 : 3:46:25 PM
Have you tested the script like below? It worked for me.

range rr = 1!2:end;
rnormalize -r 2 irng:=rr;
AKazak Posted - 10/26/2022 : 3:21:18 PM
quote:
Originally posted by YimingChen

range rr = 2:end;
rnormalize -r 2 irng:=rr;




Got it.
How do I define rr for a different sheet based on sheet index.
The following syntax doesn't work:
range rr = 3!2:end;


---
Andrey
YimingChen Posted - 10/26/2022 : 1:46:03 PM
range rr = 2:end;
rnormalize -r 2 irng:=rr;
AKazak Posted - 10/26/2022 : 12:26:50 PM
quote:
Originally posted by YimingChen

Please try the script:

string wksStr = "Sheet1";
int index = 2;
range rr = %(wksStr$)!$(index);
rr[1]=;



James



Dear James,

How do I set range to few columns, say from 2 to end?

---
Andrey
YimingChen Posted - 10/26/2022 : 11:41:36 AM
Please try the script:

string wksStr = "Sheet1";
int index = 2;
range rr = %(wksStr$)!$(index);
rr[1]=;



James

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