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
 Origin Forum
 deleting rows in a for loop. help please.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

zerez

1 Posts

Posted - 12/06/2012 :  09:11:43 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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.

JacquelineHe

287 Posts

Posted - 12/06/2012 :  9:40:23 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
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