I understood to achieve data sorting , we need to obtain the DataSorter from the workbook instance. If I have multiple worksheets within a single workbook and I need to sort data in multiple worksheets, how should I instantiate the DataSorter ?
My above concern is because, how would I be able to achieve this across multiple sheets when I don’t have connectivity within each sheet ?
You can get the DataSorter object from the workbook and then sort data for different sheets separately. Aspose.Cells follows MS Excel standards and specifications when sorting data. You will specify the cells of each worksheet (for first parameter) and specify range/area of the sheet (for other parameter(s)) for data sorting. See the sort method overloads you may choose:
int[] sort(Cells cells, CellArea area)
int[] sort(Cells cells, int startRow, int startColumn, int endRow, int endColumn)
In MS Excel, you will sort data based on displayed columns in the current/displayed sheet using “Sort” command. You cannot sort data in other sheets while remaining in the current sheet.
See the document on data sorting for your reference.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.