Only a little question:
I have a excel sheet with 3 columns.
How can i sort using column 2 oder 3?
XLS[0].Sort(0,XLS[0].FirstRow,2,XLS[0].LastRow,TRUE,TRUE);
only sorts using column 0.
Thanks for help.
Sort Columns?
-
- Posts: 7
- Joined: Wed Jul 10, 2013 6:42 pm
Re: Sort Columns?
...
Last edited by Anonymous47 on Wed Feb 25, 2015 6:33 am, edited 1 time in total.
Re: Sort Columns?
Hello
The values of FirstRow and LastRow is probably wrong. You must use XLS[0].CalcDimensions before you can use these values.
The values of FirstRow and LastRow is probably wrong. You must use XLS[0].CalcDimensions before you can use these values.
Lars Arvidsson, Axolot Data
-
- Posts: 7
- Joined: Wed Jul 10, 2013 6:42 pm
Re: Sort Columns?
I think you dont understand me. I will sort full rows, but not only ohne column of a row, and not column 1, but column 2 oder 3.
Re: Sort Columns?
Hello
Sort on column 2
Sort on column 3
Sort on column 2
Code: Select all
XLS[0].Sort(1,XLS[0].FirstRow,1,XLS[0].LastRow,TRUE,TRUE);
Code: Select all
XLS[0].Sort(2,XLS[0].FirstRow,2,XLS[0].LastRow,TRUE,TRUE);
Lars Arvidsson, Axolot Data
-
- Posts: 7
- Joined: Wed Jul 10, 2013 6:42 pm
Re: Sort Columns?
You dont understand me. Small example:
23456 - - a - - 07.01.1900
43 - - f - - 01.01.1900
356675 - - df - - 02.01.1900
XLS[0].Sort(2,XLS[0].FirstRow,2,XLS[0].LastRow,TRUE,TRUE);
Result:
23456 - - a - - 01.01.1900
43 - - f - - 02.01.1900
356675 - - df - - 07.01.1900
but it should be
43 - - f - - 01.01.1900
356675 - - df - - 02.01.1900
23456 - - a - - 07.01.1900
23456 - - a - - 07.01.1900
43 - - f - - 01.01.1900
356675 - - df - - 02.01.1900
XLS[0].Sort(2,XLS[0].FirstRow,2,XLS[0].LastRow,TRUE,TRUE);
Result:
23456 - - a - - 01.01.1900
43 - - f - - 02.01.1900
356675 - - df - - 07.01.1900
but it should be
43 - - f - - 01.01.1900
356675 - - df - - 02.01.1900
23456 - - a - - 07.01.1900