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
 LabTalk Forum
 extract worksheet data rows strings
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

coll@inia.

Spain
125 Posts

Posted - 02/07/2015 :  10:01:21 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Castiel

343 Posts

Posted - 02/07/2015 :  12:02:28 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
wxt test:="col(1)=="mx*" || col(1)=="crp*" || col(1)=="psm*" || col(1)=="nitr*"" ow:=<new>;


妾+   午旦  妹罕妾  妾伊    用仇  妾/     岫ㄞ
 妾京用 仍巨  件 侈   件戶' 甘岫平   /欠  白岫妹
   併             艮          岫  奈 白   岫
                              岫
Go to Top of Page

coll@inia.

Spain
125 Posts

Posted - 02/07/2015 :  2:34:55 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
BEAUTIFUL, IT WORKED!!!!
Thanks, julio
Go to Top of Page

abhishekkhare

Switzerland
4 Posts

Posted - 04/08/2016 :  08:26:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 04/08/2016 :  10:07:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

abhishekkhare

Switzerland
4 Posts

Posted - 04/08/2016 :  12:21:54 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Hideo, it worked. Thanks for the wcol trick too. Appreciate your quick help.

Abhi
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