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
 Origin Forum
 deleting rows in a for loop. help please.

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
zerez Posted - 12/06/2012 : 09:11:43 AM
origin pro 8
windows 7

Hello everyone.
I have a .dat file that I opened with Origin with 4 columns and 3000 rows.
In column number 3, I want to detect where I have values that are
smaller than 15, and if the value is lower than 15 I want
the program to delete all the raw.

How do I write the program in the script window to do that?

Thank u very much.
1   L A T E S T    R E P L I E S    (Newest First)
JacquelineHe Posted - 12/06/2012 : 9:40:23 PM
Hi,

I suggest you can extract the rows when the data is larger than 15 in column 3.

Please try to run this following script in Script Window:
(I assume your data is in Book1 sheet1.)
range aa=[Book1]Sheet1!Col(1), bb=[Book1]Sheet1!Col(2), cc=[Book1]Sheet1!Col(3), dd=[Book1]Sheet1!Col(4); 
string strCond$="cc >= 15";
wxt test:=strCond$ ow:="Extracted Rows"!;

Then the rows you need will be extracted in Extracted Rows sheet.

Also, you can refer to the example in this page:
http://www.originlab.com/www/helponline/Origin/en/Programming/mergedProjects/labtalk/Script/Worksheet_Data_Manipulation.html#Extract_Worksheet_Data

Thanks

OriginLab
Jacqueline

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