Reduce worksheet by merging or deleting rows
Minimum Origin Version Required: 9.1 SR0
1. wreducerows method:=merge nrows:=3 merge:=ave start:=2;
2. wreducerows method:=hidden;
Please refer to the page for additional option switches when accessing the x-function from script
This option is only available when Reduce Method is Delete rows with missing values (method=missing) or Delete rows with masked values (method=merge).
And the variable irng is Reference Column
This X-Function is used to delete rows or merge rows with specified statistics data. See also here.
Suppose we have a worksheet data. We want to keep rows where col(B)'s value is bigger than 5000 and delete the rest. Run codes below:
//add a filter to col(B) and hide all rows <5000
wks.col2.filter = 1;
//delete hidden rows