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
 Origin Forum
 Automatic subgroup the datasheet?

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
HuangZY Posted - 11/06/2009 : 7:14:41 PM
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
2   L A T E S T    R E P L I E S    (Newest First)
larry_lan Posted - 11/10/2009 : 11:40:44 AM
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
easwar Posted - 11/07/2009 : 4:18:07 PM
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

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