Reduce Rows
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
Input
Range
int
Option list:
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
Output
This X-Function is used to delete rows or merge rows with specified statistics data. See also here.
Example 1
Example 2
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; wks.col2.filter$="x>5000"; wks.runfilter(); wks.col2.filter=0; //delete hidden rows wreducerows method:=hidden;
reducerows, wdelrows
Keywords:data reduction