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
 extract worksheet data rows strings

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
coll@inia. Posted - 02/07/2015 : 10:01:21 AM
Origin Ver.2015 and Service Release (Select Help-->About Origin):
Operating System: win 8

I am trying to extract rows with 4 strings from a worksheet to another new worksheet and give it a similar name to the original wks

The strings are mx*. crp*, psm*, and nitr*. I need them together with all its row data into the same new worksheet

I am trying:
wxt test:="col(1)=="mx*"" ow:="Sheet1";

It works fine, except that I cannot make it work simultaneously for all the 4 strings and to the same worksheet.
I also have no idea of how to put a similar name into the derived new unique sheet
Of course I have many many worksheets!!

can anyone help?

Thanks, julio
5   L A T E S T    R E P L I E S    (Newest First)
abhishekkhare Posted - 04/08/2016 : 12:21:54 PM
Thanks Hideo, it worked. Thanks for the wcol trick too. Appreciate your quick help.

Abhi
Hideo Fujii Posted - 04/08/2016 : 10:07:46 AM
Hi Abhi,

If windValue and mCol1Ref are scalar values, you don't need $(...) there.
As far as I have tried, the following code works:
windRefColNo=1; mCol1=2;
windValue=2; mCol1Ref=0;
windEffectColNo=1;
//
string extCond$ = "col($(windRefColNo))==windValue && col($(mCol1))==mCol1Ref";
wxt test:=extCond$ c1:=windEffectColNo c2:=windEffectColNo ow:=<new>;
Note, if you use wcol(...) instread of col($(...)) you can reduce the depth of nesting.
http://www.originlab.com/doc/LabTalk/ref/WCol-func

Hope this helps.

--Hideo Fujii
OriginLab
abhishekkhare Posted - 04/08/2016 : 08:26:21 AM
Friends, I have the same problem.
Want an extract of a sheet based on two conditions. Tried various combination of syntax but no luck.
I want my condition like this:

string extCond$ = "col($(windRefColNo))==$(windValue) && col($(mCol1))==$(mCol1Ref)";

WXT is following:
wxt test:=extCond$ c1:=$(windEffectColNo) c2:=$(windEffectColNo) ow:=outName$;

And yes, it works with single condition.

I will appreciate any quick help. Thank you!

Abhi
coll@inia. Posted - 02/07/2015 : 2:34:55 PM
BEAUTIFUL, IT WORKED!!!!
Thanks, julio
Castiel Posted - 02/07/2015 : 12:02:28 PM
wxt test:="col(1)=="mx*" || col(1)=="crp*" || col(1)=="psm*" || col(1)=="nitr*"" ow:=<new>;


©c¡Ï   ¤È¥¹  ©f¨u©c  ©c¥ì    ¥Î¤³  ©c/     ©¦£¯
 ©c¨Ê¥Î ¤´¥¨  ¥ó ¨×   ¥ó¤á' ¥Ì©¦¥­   /¤í  ¥Õ©¦©f
   ¨Ö             ¦á          ©¦£þ  ©` ¥Õ   ©¦
                              ©¦

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