Sort On Multiple Columns

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
obeltrami
Posts: 15
Joined: Tue Jun 23, 2015 6:11 pm

Sort On Multiple Columns

Post by obeltrami »

Hello,

I searched for a way to sort by multiple columns (first D then A, for example) and I saw in the release notes that version 5.10 had "New Sort method for sorting columns. Can sort on multiple columns.".

But the 2 overloaded Sort() functions do not seem to allow to sort on multiple columns AFAIK. I also could not find it in the doc-o-matic documentation.

Could you share example code of sorting a sheet by column D then A, for example ?

Very best regards,

Olivier
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Sort On Multiple Columns

Post by larsa »

Hello

Here is an example which will sort on columns C and D:

Code: Select all

XLS[0].Sort(2,0,4,XLS_MAXROW,True,True);
Lars Arvidsson, Axolot Data
nagygabor679
Posts: 4
Joined: Wed Sep 07, 2022 8:07 am

Re: Sort On Multiple Columns

Post by nagygabor679 »

Hi,
How can I sort whole table by X (any) column?
Thanks,
Gábor
Post Reply