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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 to_list2 for Label Row Cells
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AKazak

Russia
1235 Posts

Posted - 07/04/2022 :  05:53:24 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

AKazak

Russia
1235 Posts

Posted - 07/05/2022 :  01:26:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

minimax

365 Posts

Posted - 07/05/2022 :  03:53:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply

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.

Go to Top of Page

AKazak

Russia
1235 Posts

Posted - 07/05/2022 :  05:35:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

minimax

365 Posts

Posted - 07/05/2022 :  9:41:56 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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?
Go to Top of Page

AKazak

Russia
1235 Posts

Posted - 07/05/2022 :  10:31:36 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000