faqts : Computers : Programming : Languages : Tse : Sort

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

Entry

TSE: Column: Sort: Numeric: How to: How to possibly do a numeric sort of a column using TSE?

Sep 26th, 2004 14:18
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 19 September 2004 - 04:38 pm ------------------

TSE: Column: Sort: Numeric: How to: How to possibly do a numeric sort 
of a column using TSE?

---
---

Right align the column

---

e.g.

1. if you want to sort this column on the numbers:

--- cut here: begin --------------------------------------------------

MySuiteButtonCaption1
MySuiteButtonCaption10
MySuiteButtonCaption100
MySuiteButtonCaption1000
MySuiteButtonCaption1001
MySuiteButtonCaption1002
MySuiteButtonCaption1003
MySuiteButtonCaption1004
MySuiteButtonCaption1005
MySuiteButtonCaption1006
MySuiteButtonCaption1007
MySuiteButtonCaption1008
MySuiteButtonCaption1009
MySuiteButtonCaption101
MySuiteButtonCaption1010
MySuiteButtonCaption1011
MySuiteButtonCaption1012
MySuiteButtonCaption1013
MySuiteButtonCaption1014
MySuiteButtonCaption1015
MySuiteButtonCaption1016
MySuiteButtonCaption1017
MySuiteButtonCaption1018
MySuiteButtonCaption1019
MySuiteButtonCaption102
MySuiteButtonCaption1020
MySuiteButtonCaption1021
MySuiteButtonCaption1022
MySuiteButtonCaption1023
MySuiteButtonCaption1024
MySuiteButtonCaption1025
MySuiteButtonCaption1026
MySuiteButtonCaption1027
MySuiteButtonCaption1028
MySuiteButtonCaption1029
MySuiteButtonCaption103
MySuiteButtonCaption1030
MySuiteButtonCaption1031
MySuiteButtonCaption1032
MySuiteButtonCaption1033
MySuiteButtonCaption1034
MySuiteButtonCaption1035
MySuiteButtonCaption1036
MySuiteButtonCaption1037
MySuiteButtonCaption1038

--- cut here: end ----------------------------------------------------

2. Right align the column on the numbers
   (by e.g. manually or with a macro
    inserting enough spaces)

--- cut here: begin --------------------------------------------------

MySuiteButtonCaption   1
MySuiteButtonCaption  10
MySuiteButtonCaption 100
MySuiteButtonCaption1000
MySuiteButtonCaption1001
MySuiteButtonCaption1002
MySuiteButtonCaption1003
MySuiteButtonCaption1004
MySuiteButtonCaption1005
MySuiteButtonCaption1006
MySuiteButtonCaption1007
MySuiteButtonCaption1008
MySuiteButtonCaption1009
MySuiteButtonCaption 101
MySuiteButtonCaption1010
MySuiteButtonCaption1011
MySuiteButtonCaption1012
MySuiteButtonCaption1013
MySuiteButtonCaption1014
MySuiteButtonCaption1015
MySuiteButtonCaption1016
MySuiteButtonCaption1017
MySuiteButtonCaption1018
MySuiteButtonCaption1019
MySuiteButtonCaption 102
MySuiteButtonCaption1020
MySuiteButtonCaption1021
MySuiteButtonCaption1022
MySuiteButtonCaption1023
MySuiteButtonCaption1024
MySuiteButtonCaption1025
MySuiteButtonCaption1026
MySuiteButtonCaption1027
MySuiteButtonCaption1028
MySuiteButtonCaption1029
MySuiteButtonCaption 103
MySuiteButtonCaption1030
MySuiteButtonCaption1031
MySuiteButtonCaption1032
MySuiteButtonCaption1033
MySuiteButtonCaption1034
MySuiteButtonCaption1035
MySuiteButtonCaption1036
MySuiteButtonCaption1037
MySuiteButtonCaption1038

--- cut here: end ----------------------------------------------------

3. Then do a column sort on the last numbers only:
   (=highlight only the numbers in the column, then
     do a sort)

--- cut here: begin --------------------------------------------------


                do a column sort on this part of the column only
               ---->----<-------
MySuiteButtonCaption   1
MySuiteButtonCaption  10
MySuiteButtonCaption 100
MySuiteButtonCaption 101
MySuiteButtonCaption 102
MySuiteButtonCaption 103
MySuiteButtonCaption1000
MySuiteButtonCaption1001
MySuiteButtonCaption1002
MySuiteButtonCaption1003
MySuiteButtonCaption1004
MySuiteButtonCaption1005
MySuiteButtonCaption1006
MySuiteButtonCaption1007
MySuiteButtonCaption1008
MySuiteButtonCaption1009
MySuiteButtonCaption1010
MySuiteButtonCaption1011
MySuiteButtonCaption1012
MySuiteButtonCaption1013
MySuiteButtonCaption1014
MySuiteButtonCaption1015
MySuiteButtonCaption1016
MySuiteButtonCaption1017
MySuiteButtonCaption1018
MySuiteButtonCaption1019
MySuiteButtonCaption1020
MySuiteButtonCaption1021
MySuiteButtonCaption1022
MySuiteButtonCaption1023
MySuiteButtonCaption1024
MySuiteButtonCaption1025
MySuiteButtonCaption1026
MySuiteButtonCaption1027
MySuiteButtonCaption1028
MySuiteButtonCaption1029
MySuiteButtonCaption1030
MySuiteButtonCaption1031
MySuiteButtonCaption1032
MySuiteButtonCaption1033
MySuiteButtonCaption1034
MySuiteButtonCaption1035
MySuiteButtonCaption1036
MySuiteButtonCaption1037
MySuiteButtonCaption1038

--- cut here: end ----------------------------------------------------

4. Remove the extra inserted spaces
   (e.g. via highlighting the whole block
    then doing a LReplace( " ", "", "gln"
    repeatedly until all spaces are gone )

--- cut here: begin --------------------------------------------------


MySuiteButtonCaption1
MySuiteButtonCaption10
MySuiteButtonCaption100
MySuiteButtonCaption101
MySuiteButtonCaption102
MySuiteButtonCaption103
MySuiteButtonCaption1000
MySuiteButtonCaption1001
MySuiteButtonCaption1002
MySuiteButtonCaption1003
MySuiteButtonCaption1004
MySuiteButtonCaption1005
MySuiteButtonCaption1006
MySuiteButtonCaption1007
MySuiteButtonCaption1008
MySuiteButtonCaption1009
MySuiteButtonCaption1010
MySuiteButtonCaption1011
MySuiteButtonCaption1012
MySuiteButtonCaption1013
MySuiteButtonCaption1014
MySuiteButtonCaption1015
MySuiteButtonCaption1016
MySuiteButtonCaption1017
MySuiteButtonCaption1018
MySuiteButtonCaption1019
MySuiteButtonCaption1020
MySuiteButtonCaption1021
MySuiteButtonCaption1022
MySuiteButtonCaption1023
MySuiteButtonCaption1024
MySuiteButtonCaption1025
MySuiteButtonCaption1026
MySuiteButtonCaption1027
MySuiteButtonCaption1028
MySuiteButtonCaption1029
MySuiteButtonCaption1030
MySuiteButtonCaption1031
MySuiteButtonCaption1032
MySuiteButtonCaption1033
MySuiteButtonCaption1034
MySuiteButtonCaption1035
MySuiteButtonCaption1036
MySuiteButtonCaption1037
MySuiteButtonCaption1038

--- cut here: end ----------------------------------------------------

---
---

Internet: see also:

---

TSE: Column: Align: Left: How to align left column, using regular 
expression?
http://www.faqts.com/knowledge_base/view.phtml/aid/31631/fid/904

----------------------------------------------------------------------