
Contents |
Sort an entire worksheet or selected columns
X-Function not designed for Auto GetN Dialog.
1. wsort;
2. wsort descending:=1;
3. wsort descending:=1 bycol:=2 c1:=1 c2:=3;
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| Worksheet to do sorting | w |
Input/Output Worksheet | |
Specified worksheet to sort |
| Sort By Column index | bycol |
Input int | |
Specifeid the column data as the sort index. |
| Decending or ascending | descending |
Input int | |
Specified descending or ascending. |
| sort numeric_suffix | sortnumeric |
Input int | |
Whether to Sort by Numeric Suffix |
| Nested Sort Columns | nestcols |
Input vector | |
index of columns used in sorting criteria |
| Sort Orders | order |
Input vector | |
sorting order index, 0 ascending, 1 descending. Its size should match the one of variable Columns. |
| Column From | c1 |
Input int | |
Start index of columns selected for sorting. Used when select "selected columns" sort type. Its size should equal or larger than the one of variable Columns. |
| Column To | c2 |
Input int | |
End index of columns selected for sorting. Used when select "selected columns" sort type. Its size should equal or larger than the one of variable Columns. |
| Row From | r1 |
Input int | |
Start index of rows selected for sorting. |
| Row To | r2 |
Input int | |
End index of rows selected for sorting |
| Missing is Largest | missing |
Input int | |
Whether the missing value as largest. |
This function is used to sort the worksheet by some column bycol (as index). Or nested sorted by some columns nestcols, then we can also set descending or ascending by each column order. We can specified the range(start row, end row, start column, end column) to sort. We can also sort by numeric suffix column(as index).
For more examples, please refer to XF Script Dialog (press F11).