SSSortEx Function
Applies To
fpSpread DLL control
Description
Sets the sort parameters and performs a sort on the specified data.
Syntax
BOOL SSSortEx(HWND hWnd, SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, WORD wSortBy, LPSS_SORTKEY lpSortKeys, short nSortKeyCnt);
BOOL TSpread::SortEx(SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, WORD wSortBy, LPSS_SORTKEY lpSortKeys, short nSortKeyCnt);
Parameters
The following parameters are available:
Parameter | Description | |
---|---|---|
hWnd | Window handle of the fpSpread control | |
Col | Column number of first column of block (Value can be SS_ALLCOLS to sort only columns.) |
|
Row | Row number of first row of block (Value can be SS_ALLROWS to sort only rows.) |
|
Col2 | Column number of last column of block (If Col is SS_ALLCOLS, this value is ignored.) |
|
Row2 | Row number of last row of block (If Row is SS_ALLROWS, this value is ignored.) |
|
wSortBy | Sort rows or columns Choose one of the following values: |
|
Constant | Description | |
SS_SORT_ROW | Sort rows | |
SS_SORT_COL | Sort columns | |
lpSortKeys | Specifies an array of SS_SORTKEY structures | |
nSortKeyCnt | Total number of sort keys |
This function is applied to the current sheet setting unless you first call the SSSetSheet function to specify the sheet for which you are calling this function. To determine the settings you want for the Col, Row, Col2, and Row2 parameters, see Using Column and Row Properties.
Remarks
Call the SSSortEx function instead of the SSSort function if you want to sort by more than three sort keys. You can sort by up to 256 sort keys by calling the SSSortEx function.
Specify the block of columns and rows to sort and whether to sort in ascending or descending order by creating an array of SS_SORTKEY structures.
Notes:
|
Return Value
TRUE if the function completes successfully; FALSE otherwise.
See Also
SSGetData, SSSetSheet, SSSort functions
SS_SORTKEY structure