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
 Help with script: extract data

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
Naughtje Posted - 09/21/2015 : 7:56:47 PM
Is there a way to extract multiple sweeps (or groups) of data contained in a single column and output them to a new workbook with each sweep (group) in a separate column? I know how to do this manually using the worksheet extract data query and then just copy and pasting each time to a new column in the new workbook, but I figured there is a way to write a script with a loop to avoid having to manually input the range for each extraction. Any help is greatly appreciated
5   L A T E S T    R E P L I E S    (Newest First)
Men Bro Posted - 10/22/2015 : 11:59:12 PM
quote:
Originally posted by SeanMao

Hi,

You can use colcopy function to copy columns to desired columns:

http://www.originlab.com/doc/X-Function/ref/colcopy

Regards!

Sean



Thank you so much, It work for me too, that's exactly what i need!
SeanMao Posted - 09/23/2015 : 11:22:50 PM
Hi,

You can use colcopy function to copy columns to desired columns:

http://www.originlab.com/doc/X-Function/ref/colcopy

Regards!

Sean
Naughtje Posted - 09/22/2015 : 4:44:53 PM
Just noticed my script was wrong. Fixed it so now it reads:

wunstackcol irng1:=col(D) irng2:=col(A) ow:=Sheet1!;
wunstackcol irng1:=col(E) irng2:=col(A) ow:=Sheet2!;
wunstackcol irng1:=col(F) irng2:=col(A) ow:=Sheet3!;
wunstackcol irng1:=col(G) irng2:=col(A) ow:=Sheet4!;
etc.

Now I'm trying to get it to extract to a specific column (col(2)-col(11)). How do I impliment that?
Naughtje Posted - 09/22/2015 : 4:05:22 PM
Great thank you!
I'm now having trouble running this with multiple columns. I have the following script:
wunstackcol irng1:=col(D) irng2:=col(A) ow:=Sheet!1;
wunstackcol irng1:=col(E) irng2:=col(A) ow:=Sheet!2;
wunstackcol irng1:=col(F) irng2:=col(A) ow:=Sheet!3;
wunstackcol irng1:=col(G) irng2:=col(A) ow:=Sheet!4;
wunstackcol irng1:=col(H) irng2:=col(A) ow:=Sheet!5;

where I'm trying to output each iteration to a different worksheet, however, I end up only outputting the last iteration listed.
SeanMao Posted - 09/21/2015 : 9:43:28 PM
Hi,

To split columns into multiple columns by row index grouping, you can use X function colsplit. For details, you can search colsplit in X-Function documentation.

For example: colsplit irng:=col(A) method:=seq nrows:=10; // Extract every consecutive 10 rows into new columns.

If you want to split columns into multiple sheets, you can use wsplit function:

http://www.originlab.com/doc/X-Function/ref/wsplit

If you have a grouping column, you can unstack your data according to grouping information using wunstackcol:

http://www.originlab.com/doc/X-Function/ref/wunstackcol

Regards!

Sean

OriginLab Tech. Service

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