Sort Method
See Also DLL Example 1 Example 2
Applies To
fpSpread control
Description
Sorts the specified data.
Syntax
BOOL CSpreadSheet::Sort(long lCol, long lRow, long lCol2, long lRow2, long nSortBy, VARIANT* SortKeys, VARIANT* SortKeyOrders);
fpSpread1.Sort(ByVal lCol As Long, ByVal lRow As Long, ByVal lCol2 As Long, ByVal lRow2 As Long, ByVal nSortBy As SortByConstants, SortKeys As Variant, SortKeyOrders As Variant) As Boolean
Parameters
The following parameters are available:
Parameter | Description | ||
---|---|---|---|
lCol | Column at which to begin sorting | ||
lRow | Row at which to begin sorting | ||
lCol2 | Column at which to end sorting | ||
lRow2 | Row at which to end sorting | ||
nSortBy | Specifies to sort one of the following: | ||
Value | Constant | Description | |
0 | SortByRow | Rows (sorts rows) | |
1 | SortByCol | Columns (sorts columns) | |
SortKeys | (Optional) Specifies columns or rows by which to sort If you are sorting by more than one column or row, provide an array indicating the columns or rows on which to sort, in the order in which you want them sorted |
||
SortKeyOrders | (Optional) Specifies whether to sort in ascending or descending order |
Remarks
You can sort by up to 256 sort keys.
This method is called for the current sheet setting unless you first set the Sheet property to specify the sheet with which you want to work.
You can use the SortKey and SortKeyOrder properties instead of the SortKeys and SortKeyOrders parameter arrays. If you use the SortKey and SortKeyOrder properties, do not set the optional SortKeys and SortKeyOrders parameters.
Notes:
|
Return Type
True if successful; otherwise, False.
See Also
Sheet, SortKey, SortKeyOrder properties
DLL Correspondence
SSSort function