OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

wsort

Contents

Brief Information

Sort an entire worksheet or selected columns

Additional Information

X-Function not designed for Auto GetN Dialog.

Command Line Usage

1. wsort;

2. wsort descending:=1;

3. wsort descending:=1 bycol:=2 c1:=1 c2:=3;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Worksheet to do sorting w

Input/Output

Worksheet

<active>

Specified worksheet to sort

Sort By Column index bycol

Input

int

1

Specifeid the column data as the sort index.

Decending or ascending descending

Input

int

0

Specified descending or ascending.

sort numeric_suffix sortnumeric

Input

int

0

Whether to Sort by Numeric Suffix

Nested Sort Columns nestcols

Input

vector

<optional>

index of columns used in sorting criteria

Sort Orders order

Input

vector

<optional>

sorting order index, 0 ascending, 1 descending. Its size should match the one of variable Columns.

Column From c1

Input

int

1

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

0

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

1

Start index of rows selected for sorting.

Row To r2

Input

int

0

End index of rows selected for sorting

Missing is Largest missing

Input

int

0

Whether the missing value as largest.

Description

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).

Examples

For more examples, please refer to XF Script Dialog (press F11).