Author |
Topic |
|
bego1908
Spain
3 Posts |
Posted - 01/21/2014 : 09:18:20 AM
|
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
|
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 |
|
|
bego1908
Spain
3 Posts |
Posted - 01/22/2014 : 04:49:01 AM
|
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 |
|
|
greg
USA
1378 Posts |
Posted - 01/22/2014 : 09:57:09 AM
|
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. |
|
|
raleighhhp
USA
1 Posts |
Posted - 02/02/2014 : 12:01:00 PM
|
I have tried Dr. Bobs's fix and it worked for me
|
|
|
|
Topic |
|
|
|