EmEditor (text editor) Forum Index
   Questions and Answers about EmEditor Core
     Hi, Can anyone help me on "Sorting" please
Register To Post

Threaded | Oldest First Previous Topic | Next Topic | Bottom
Poster Thread
thanksgod
Posted on: 6/11/2012 8:59 pm
Just popping in
Joined: 2/23/2012
From:
Posts: 19
Re: Hi, Can anyone help me on "Sorting" please
Hi, Stefan

OMG, how easy it is, so now I don't have use Microsoft Word anymore!!!

Thank you so much for your solution. It works Wonderfully!!!

Cool Cool Cool

Thank you sir!!
Stefan
Posted on: 6/10/2012 12:19 pm
Home away from home
Joined: 7/14/2008
From: Germany, EU
Posts: 257
Re: Hi, Can anyone help me on "Sorting" please
You can sort by column in EmEditor
while you are in "Separated Values" mode.

1.)
Therefor you have to delimiter your columns first by either
* one tab (\t) => TSV mode
* one coma (,) => CSV mode
* one own delimiter => DSV mode ( e.g. one ":" or "|" or ";" or one space " " or...)

Hint: For your examples
RegEx Search for three-or-more spaces
and replace by an coma:
Find: \s{3,}
Replace: ,
[X] Use Regular Expressions
Now you have CSV.



2.)
Next switch to delimiter mode via
menu "Edit > Separated Values/Sort > selecting-your-mode"

For your case use CSV if you have followed the s&r tip.

Hint: you must seen some thin vertical lines.



3.)
Then click into an column and use an Sort mode.




Explanation:
CSV means "Coma Separate Value" and you
must have an coma between your columns.
There must be NO coma inside the column itself!

TSV means "Tabulator Separated Value"
and the same is valid as said for CSV.

DSV means "Defined(by user) Separated Value"
and you have to set the delimiter yourself
e.g to ';' or '|' or something like that.
To setup the DSV delimiter go to menu
"Tools > Properties for X"
and at the [File] tab
set the "Delimiter [; ]"


Since spaces can sophisticate the sorting
be sure to have no, or at least the same
amount of spaces around your delimiter.
(Your example lines have uneven amount
of spaces between the columns)


Please note that you can also right click
the ruler to get the "Separated Value" menu.



HTH?

For more read the help or visit
http://www.emeditor.com/modules/feature1/rewrite/tc_35.html#csv
http://www.emeditor.com/modules/tutorials4/index.php?id=35
thanksgod
Posted on: 6/10/2012 7:00 am
Just popping in
Joined: 2/23/2012
From:
Posts: 19
Hi, Can anyone help me on "Sorting" please
Hi, Can anyone help me on "Sorting" please

I need to sort some column like the following

GHI-12514518    erg5124ws3      Expiry date:2011.03.30
ABC-42512544   jkje39735k        Expiry date:2017.05.20
DEF-02151451    a2j397hgjv       Expiry date:2015.04.11

I've tried all the following mode
Normal Mode
CSV Mode
TSV Mode

Can I sort by "Column" not "Row", eg. If I want to sort column 3, I should get the following result:

GHI-12514518    erg5124ws3      Expiry date:2011.03.30
DEF-02151451    a2j397hgjv       Expiry date:2015.04.11
ABC-42512544   jkje39735k        Expiry date:2017.05.20

If I want to sort column 2, I should get the following result:

DEF-02151451    a2j397hgjv       Expiry date:2015.04.11
GHI-12514518    erg5124ws3      Expiry date:2011.03.30
ABC-42512544   jkje39735k        Expiry date:2017.05.20

But All I get from using (OR not using) the highlight the column 2 or 3 using the "Sticky Vertical Mode", the result is just the same as normal sorting "Sorting by row" or "Sorting by column 1".

ABC-42512544   jkje39735k        Expiry date:2017.05.20
DEF-02151451    a2j397hgjv       Expiry date:2015.04.11
GHI-12514518    erg5124ws3      Expiry date:2011.03.30

Only method I do at the moment, is to copy all the texts and paste them in Microsoft Word, and then use its built in "Sorting Function" by selecting the column I need and then just copy the result back to EmEditor" = ="

Is there any workaround for this problem using EmEditor itself?

Thank you so much
Threaded | Oldest First Previous Topic | Next Topic | Top


Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文