MaxImai89
Germany
2 Posts |
Posted - 11/11/2018 : 12:25:30 PM
|
OriginPro 2018G SR1, Operating System: Windows 7
Ladies and Gentlemen, I would like to keep only every 10 row in my table. For this purpose, I have tried to write the following script.
// Script
q=%H!wks.maxRows; // get the number of rows q=q+1; int ii2=0; int ii3=0; for(int ii=1; ii<q; ii++) { ii2=ii+1; //that the gap of 10 Values (rows) will be deleted ii3=ii+10; //if(ii3>q){ii=q; ii3=ii2;} wks.deleteRows(ii2,ii3); // delete Rows q=%H!wks.maxRows; // get the number of rows q=q+1; }
// End of the Script
Unfortunately, the values are not removed continuously, i.e. at the end of the table, more values are removed than desired. So it seems as if the distance between the data to be deleted increases quadratically. I would be very happy about your help. |
Edited by - MaxImai89 on 11/11/2018 12:30:45 PM |
|