We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Natural sort with aspose

Natural sort with aspose? I have an excel column that contains alphanumeric data such as A11,A2,A9, A10. Issue is that an ascending sort provides the output A10, A11, A2, A9 . How do we obtain a natural sort with the expected output A2, A9, A10, A11 ?


Thanks for your query.

Well, this (the result) is default MS Excel’s behavior for data sorting, you may confirm it in MS Excel (the data is sorted based on ascii code/value for alpha-numeric data). I think you may try using custom lists for your customized data sorting. See the document with example for your reference:

See the sample line of code for your reference:

//Create Custom Sort list
string[] customSortList = new string[] { “A2”, “A9”, “A10”, “A11” };