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
 Forum for Python
 select and merge the data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ulhong84

11 Posts

Posted - 07/28/2022 :  04:52:28 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:OriginPro 2002 (9.9.0220)

How can I select the data and merge the data in new worksheet?
For example, I have 5 worksheet and want to select the data in 5th column and merge the 5 data in one new worksheet?

Please help ~~

minimax

351 Posts

Posted - 07/28/2022 :  05:58:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi

How about using Labtalk(XF) script inside python? like

import originpro as op
wp=op.find_book()
wp.lt_exec(f'wAppend -r 2 irng:=[{wp.name}](1!5,2!5) ow:=[<new>]<new>;')


https://www.originlab.com/doc/X-Function/ref/wAppend
Go to Top of Page

ulhong84

11 Posts

Posted - 08/01/2022 :  8:43:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by minimax

Hi

How about using Labtalk(XF) script inside python? like

import originpro as op
wp=op.find_book()
wp.lt_exec(f'wAppend -r 2 irng:=[{wp.name}](1!5,2!5) ow:=[<new>]<new>;')


https://www.originlab.com/doc/X-Function/ref/wAppend



I am a beginner of python. So I don't fully understand the above code.

Do I have to put the sheet or book name in this line of {wp.name}??
Also, do I have to write the name of new sheet in <new>?

Could you explain more detail?


Go to Top of Page

minimax

351 Posts

Posted - 08/02/2022 :  01:17:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Labtalk is not a kind of python language, but Origin's own script language.

Origin's python package supports calling Origin's script.

In the sample code it is called by the command lt_exec().

I suggest XF since it seems to provides the result as you need.
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