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
 Avoid empty cells using wxt

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
JokerOne Posted - 05/06/2016 : 07:43:11 AM
Origin Ver.9.1 and Service Release 1(Select Help-->About Origin):
Operating System: Win 7

Hello everybody,

I ran into the follwing somewhat strage result using wxt.
As a dummy code:

// create a worksheet with 1 to 1000 in col(a):
newbook Book1;
dataset aaa = {1:1:1000};
col(a) = aaa;

// Extract 1 line into new worksheet, e.g. the line with 123
// USE WXT:
wxt test:="col(a) = 123" ow:= Book2;

Now, the export works fine, but what strikes me is, that the new worksheet also contains 1000 rows of which 999 are empty.

Can this be avoided somehow using wxt?

In my scripts I am using wxt a lot to extract data from larger lists. I would like to keep the results worksheets small to avoid unnessary memory requirements for the huge "almost empty" worksheets.

Thanks for your help



3   L A T E S T    R E P L I E S    (Newest First)
phancao129 Posted - 05/17/2016 : 11:09:07 AM
We invite you to explore our site to learn more about who we are, what we do and how we can assist you and your loved ones. You will find a wealth of valuable information here, including videos and blog posts about topics that, over the years, many of our clients have asked about at our initial meetings.

http://assetprotectioncenter.com/


[url=http://assetprotectioncenter.com/]asset protection law[/url]
[url=http://assetprotectioncenter.com/]estate planning in california[/url]
JokerOne Posted - 05/10/2016 : 05:55:48 AM
quote:
Originally posted by SeanMao

Hi,

You can workaround it by using script below:
[...]
The basic idea is to output number of passed rows and then set destination row number as the number of passed rows.




Works! Thank you very much.
SeanMao Posted - 05/10/2016 : 03:40:03 AM
Hi,

You can workaround it by using script below:


wxt test:="col(a)<10" ow:=Book2 num:=number; // Output passed row number
wks.nrows=number; // Set destination row number as passed number


The basic idea is to output number of passed rows and then set destination row number as the number of passed rows.

Hope this can be some help!

Regards!

Sean

OriginLab Tech.

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