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 rows from worksheet

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
zangyef Posted - 04/05/2006 : 04:29:59 AM
Origin Version: 6.0
Operating System: WinXP HE

Hi everyone. I want exctract rows, each with the same distance from the other, from a large worksheet and copy them to a new worksheet.
Is there a simple way to do this?
Thank you

6   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 10/28/2006 : 07:54:21 AM
Hi Flavio,

Yes, a worksheet with 20000 rows takes up much more memory/disk space than one with 20 rows. Use set %H -er wks.maxrows to delete the empty rows at the bottom. If you are extracting periodic rows then you might find the method discussed here useful...

http://www.nmrtools.com/labtalk/i_decimate.html

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 10/28/2006 08:03:27 AM
Flavs Posted - 10/28/2006 : 07:32:46 AM
I use this strategy to work with my datafiles, basically I have a lot of sets of mesurements in one worksheet and I separte them duplicating the worksheet and deleting with mark -d all the rows that I donīt want. The problem is that my original worksheet has like 20000 rows, so after duplicating and erasing I have 20 worksheets with the proper data but although I am only using 1000 rows of each worksheet, the size of the worksheets is 20000 rows, of course 19000 of them are empty. This result in my origin projects being huge ( aroun 600 MB ). So I have 2 questions, how do I delete this empty rows? and Am I right in thinking that my files are so big due to excesive size of worksheets with empty rows?

Thanks, Flavio.
zangyef Posted - 04/05/2006 : 09:59:35 AM
Thank you very much.
All works well.

Mike Buess Posted - 04/05/2006 : 09:11:57 AM
Probably easiest to duplicate the worksheet and remove the rows you don't want...

rep=5; // keep every 5th row
wo -d; // duplicate wks
for(i=wks.maxrows;i>0;i--) {
if(mod(i,rep)) mark -d col(1) -b i -e i; // delete row
};

Mike Buess
Origin WebRing Member
zangyef Posted - 04/05/2006 : 08:21:29 AM
Thank you Zachary, this is excatly what Origin has to do but there's a way to do that with labtalk? I tried with some for loop but with no results..

zachary_origin Posted - 04/05/2006 : 07:28:40 AM
I think the most simple way is using Extract Worksheet Data (menu: Analysis\Extract Worksheet Data). Set the condition as
mod(i-1, 5)==0 , where 5 is the distance from the other.


Zachary
OriginLab GZ Office


quote:

Origin Version: 6.0
Operating System: WinXP HE

Hi everyone. I want exctract rows, each with the same distance from the other, from a large worksheet and copy them to a new worksheet.
Is there a simple way to do this?
Thank you




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