2

I've been working on a 3474 line table. Getting the information was easy, capturing the needed information from public online sources. But I came across a problem.

The table is by default sorted alphabetically, since the first item in the table is an alphabetical value (a toponym). It is then followed by a second, numerical value, and this is the value I need the table to be sorted by.

I need to sort it because I can't just publish a 3474 line table. I need to sort it by this numerical value, and then divide into several smaller tables, and then publish them on Wikipedia.

I was using Notepad for editing, but I got Notepad++ hoping I could find an easy fix, but no luck. Line example:

| Gorna Banjica (Gostivar) || 3436 || 839 || 811 || 1053 || 610 || - || 1 || - || 15 || - || - || 107

|-

| MitraĊĦinci (Berovo) || 555 || 519 || - || - || - || - || 1 || - || 1 || - || 1 || 33

|-

How can I do this? Any help is welcome, because sorting 3474 lines manually is going to take quite a while, and my daily schedule doesn't allow me to spend more than an hour working on the table.

1 Answers1

1

Without installing add-ons, the only way to accomplish this using Notepad++ is to use its column mode to:

  1. Carefully select the correct column of numbers.
  2. Move the column by which you want to sort to the beginning of each line.
  3. Select all lines.
  4. Sort the selection as integers.
  5. Move the column back into its original position.

But the real issue is that you are attempting to use the wrong tool for the job.

Instead of using Notepad++, simply use LibreOffice Calc:

  1. Import your text document into LibreOffice Calc.
  2. Sort by any column you want (click the header for a column, then go to the Data menu, and select the Sort Ascending menuitem).

Done!