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
 Delete rows
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bego1908

Spain
3 Posts

Posted - 01/21/2014 :  09:18:20 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,
I am trying to develop a script where I would need to delete some rows, namely, I need to delete a row every sixty.
I know the command
range bb = Col(2)[1:5]
mark -d bb
which is able to delete from row 1 to 5. But what I need is to delete 60*(i-1)+1 rows where i=1,...,10. I am trying to insert a kind of loop instead of [1:5] but it doesnt work. Does anybody know how to do that?
Thanks

Drbobshepherd

USA
Posts

Posted - 01/21/2014 :  10:21:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
bego19908,

In your script, try the X-function, wdelrows.

If you want to do this manually, try the Worksheet:Reduce Rows pull-down menu.

DrBob
Go to Top of Page

bego1908

Spain
3 Posts

Posted - 01/22/2014 :  04:49:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you Dr Bob,
I think that is the X-function that I need. I should write
wdelrows del:=1 skip:=59 start:=1
The problem is that I have Origin Lab 8 and that X-function is not supported. I would need a newer version.
Do you have any other suggestion?
Thanks again
Bego1908
Go to Top of Page

greg

USA
1378 Posts

Posted - 01/22/2014 :  09:57:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This works in Origin 8:

range raY = 2;
row = 60;
for( row = 60, done = 0 ; done == 0 ; row+=59 )
{
mark -d raY -b row -e row;
if(row+59 > raY.GetSize()) done = 1;
}

deletes rows 60, 120, 180, etc.
Go to Top of Page

raleighhhp

USA
1 Posts

Posted - 02/02/2014 :  12:01:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I have tried Dr. Bobs's fix and it worked for me

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