Author |
Topic  |
|
zango24
India
Posts |
Posted - 07/20/2006 : 08:03:03 AM
|
Origin Version (Select Help-->About Origin): 7.5 Operating System: Windows XP
Dear Friends, I would like a help. I would like to select every nth column (for example every 3rd column) out of many column. Or if possible I would like to delete the every "group of columns". Means if I have many columns, I want to select 1st column and delete 2nd 3rd 4th column, then select 5th column, then again delete 6th 7th and 8th column then select 9th column and so on.
Help in terms of short script is very valuable. Thanks in advance.
|
|
Mike Buess
USA
3037 Posts |
Posted - 07/20/2006 : 09:32:04 AM
|
1. This will select columns 1, 4, 7, etc.
wo -s -1 0 -1 0; // deselect all columns for(i=1;i<=wks.ncols;i+=3) wks.colsel(i);
2. This will delete columns 2-4, 6-8, etc.
wo -d; // duplicate worksheet for(i=1;i<=wks.ncols;i++) { if( mod(i-1,4) ) wks.colsel(i); }; menu -e 36442; // delete selected columns (execute Edit > Delete) wo -s 0 0 0 0; // select all columns
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 07/20/2006 09:32:52 AM
Edited by - Mike Buess on 07/20/2006 10:05:12 AM |
 |
|
|
Topic  |
|
|
|