Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Adds the sorted column in AutoFilter by zero-based index and its sort order.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
XL | 11.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
bookRef | The reference to the workbook. Please use XL.LoadBook to load a file. | $ref | |
sheetIndex | The index of the sheet. This number ranges from 0 to XL.Book.SheetCount-1. | 0 | |
columnIndex | The zero based column index. | 0 | |
descending | Whether to sort descending. Pass 0 for ascending and 1 for descending. Default is descending. |
0 | Optional |
Returns OK or error.
Sort cell range with auto filter by two columns:
Set Variable [ $r ; Value: MBS( "XL.Sheet.AutoFilter"; $book; $sheet) ]
Set Variable [ $r ; Value: MBS( "XL.Sheet.AutoFilter.SetRef"; $book; $sheet; 2; 10; 1; 4) ]
Set Variable [ $r ; Value: MBS( "XL.Sheet.AutoFilter.SetSort"; $book; $sheet; 0) ]
Set Variable [ $r ; Value: MBS( "XL.Sheet.AutoFilter.AddSort"; $book; $sheet; 1) ]
Set Variable [ $r ; Value: MBS( "XL.Sheet.ApplyFilter"; $book; $sheet) ]
This function checks for a license.
Created 23th September 2021, last changed 28th June 2022