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
 to_list2 for Label Row Cells

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 - 07/04/2022 : 05:53:24 AM
OriginPro 2022b (64-bit) SR1 9.9.5.167
Windows 7 Pro SP1 x64

Greetings!

Is there a method in originpro module to read a specified range of Label Row Cells and return it in a form of list?

Thank you.

---
Andrey
5   L A T E S T    R E P L I E S    (Newest First)
AKazak Posted - 07/05/2022 : 10:31:36 PM
quote:
Originally posted by minimax

Hi AKazak,

I am not sure if I understand your question correctly.

Since get_labels() returns a list from entire row on worksheet, you can easily set up a subset on python side, like

wks=op.find_sheet()
ln = wks.get_labels('L') #Long Name row
#c1 refers to col(B), c2 refers to col(D)
c1=1
c2=3
sub_ln=ln[c1:c2+1]


Is it what you need?
or you may show a sample?



It will work for me.
Thanks.

---
Andrey
minimax Posted - 07/05/2022 : 9:41:56 PM
Hi AKazak,

I am not sure if I understand your question correctly.

Since get_labels() returns a list from entire row on worksheet, you can easily set up a subset on python side, like

wks=op.find_sheet()
ln = wks.get_labels('L') #Long Name row
#c1 refers to col(B), c2 refers to col(D)
c1=1
c2=3
sub_ln=ln[c1:c2+1]


Is it what you need?
or you may show a sample?
AKazak Posted - 07/05/2022 : 05:35:47 AM
quote:
Originally posted by minimax


wks=op.find_sheet()
ln = wks.get_labels('L') #Long Name row
ud1 = wks.get_labels('hello') #user defined label named with "hello"


I think currently there is no way to get from a specific range.

https://www.originlab.com/python/doc/originpro/classoriginpro_1_1worksheet_1_1_w_sheet.html#a3b07d74d0fd59b66760321886b78f4db

PS, the thread cannot be moved.




Got it.
Please consider improving the function to specify the label row range.

---
Andrey
minimax Posted - 07/05/2022 : 03:53:31 AM

wks=op.find_sheet()
ln = wks.get_labels('L') #Long Name row
ud1 = wks.get_labels('hello') #user defined label named with "hello"


I think currently there is no way to get from a specific range.

https://www.originlab.com/python/doc/originpro/classoriginpro_1_1worksheet_1_1_w_sheet.html#a3b07d74d0fd59b66760321886b78f4db

PS, the thread cannot be moved.

AKazak Posted - 07/05/2022 : 01:26:02 AM
I put the query here by mistake.
Please move the thread to the appropriate forum section: https://my.originlab.com/forum/forum.asp?FORUM_ID=29

Thank you.

---
Andrey

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