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
 Origin Forum
 Automatic subgroup the datasheet?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

HuangZY

10 Posts

Posted - 11/06/2009 :  7:14:41 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 8.0SR0
Operating System: win7

Hi,

Is there any possibility to create an xfunction to subgroup a datasheet automatically? I know that there is a tool named "extract worksheet data", but it can only subgroup by only one condition. E.g. in the following datasheet, I want to a tool automatic subgroup it by column F2 to datasheets where F2=1, F2=2, F2=3, F2=4 and it would be better if it supports auto-update? Would you guys consider to improve the "Extract worksheet data" tool?


--------------------

No. Batch F1 HB F2

Q T
S09FY166 905902 2 275 1
S09FY050 905902 2 290 2
S09FY106 905902 2 288 2
S09FZ060 905902 2 285 3
S09FZ320 905902 2 282 4
S09FY158 905902 2 297 5
S09HB134 905901 7 282 3
S09FZ102 905902 2 293 4

easwar

USA
1965 Posts

Posted - 11/07/2009 :  4:18:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

In version 8.1 that was just released, we have added a new tool for unstacking grouped data into multiple columns. This new tool also supports auto update, and the old extract worksheet also supports auto update in 8.1

You can download the 8.1 demo and try with your data.

Easwar
OriginLab
Go to Top of Page

larry_lan

China
Posts

Posted - 11/10/2009 :  11:40:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi:

Right now for 80, you can use some script to implement that. The following script extract subgroup data into new worksheets.

// The source worksheet, which is the current active worksheet
range wk = !;
range f2 = !col(f2);
// Create a hidden book to hold the result of frequency count
newbook r:=tmpbook hidden:=1;
// Do frequency count
discfreqs f2 rd:=[tmpbook$]!;
// Wait for the X-Function complete
run -p au;
// Get the unique data
range cnt = [tmpbook$]sheet1!col(1);
// Loop to extract data into new worksheet
for(ii=1; ii<=cnt.getsize(); ii++)
{
	double dd = cnt[ii];
	wxt test:="f2==$(dd)" iw:=wk ow:=[<input>]<new F2_$(dd)>;
}
// Delete the temp hidden workbook
win -c %(tmpbook$)

Thanks
Larry
OriginLab Technical Services
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