I thought I remember reading that there is a text editor that exists for windows that allows the sorting of data, treating the csv/tsv similar to how it is treating when one sorts in excel.

Any pointer is appreciated it is driving me crazy.


  • I don't know why the downvote. Maybe because you are asking for a software recommendation which is inappropriate. But since you combined your question with a specific problem (sorting of CSV without Excel), I think its a valid question. – nixda Jan 24 '13 at 12:14

Does it has to be a text editor? Or is a (portable) CSV/TSV editor also acceptable?

CSVed is an easy and powerful CSV file editor, you can manipulate any CSV file, separated with any separator.

Here is a screenshot of its sort functions

enter image description here

| improve this answer | |
  • Ah absolutely perfect. Works like a charm, and quickly on some decent sized files! – jason m Jan 26 '13 at 17:03

I can't think of a Windows editor that does this internally but Vim or Emacs can do it via some external tools, if that might be useful to you? Dealing with a proper CSV file would be a bit complicated but, for the simple case of a file like this example:


... a Vim command to sort the file by the second field in each line would be:

:%!cut -f2,1,3 -d, | sort | cut -f2,1,3 -d,

This relies on having cut available (e.g. from the GNU textutils, which are available for Windows) and the usual Windows sort, because the command will pipe the text through those external programs to do the work.

For a proper CSV file, though, it would be necessary to parse the CSV fully to deal with quoted commas before sorting by this method, and then to put the fields back into order again.

An example of piping through sort from Vim can be found on StackOverflow here.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.