I just copied and pasted directly from the page to LibreOffice Calc. I first alphabetized the columns on the WPB page by clicking on the column heads.
3 separate spreadsheet files. Each file had a column for nations, and a column for data.
I adjusted each data column so that there were the same number of rows in each spreadsheet file. I had to add countries into the unsentenced prisoners column for example. Even though those countries had no data for unsentenced prisoners.
In the prison population column I added commas for the blank spaces used by WPB to indicate the thousands separator. I did this all at once by using freeware NoteTab Light (or any text editor) to replace the space with the comma.
Then I copied and pasted the columns into one spreadsheet file.
I then used a sandbox page, and pasted that combined spreadsheet file into a new blank table created by the Visual Editor:
It took around 10 seconds in my Firefox browser. I had to tell it to allow the process to finish.
From the Wikipedia page I pasted in the nations column using Visual Editor since it had all the flags and links. I also pasted in the Notes column. One has to create a blank column first with the Visual Editor. Then paste into it via the Firefox edit menu: Edit > Paste.
So I had 2 nations columns and could compare them to make sure they aligned perfectly. They did. See it here:
I pasted that into Sandbox79 and removed the plain-text nations column. I used freeware NoteTab Light to add the text alignment all at once to the nations column.
Replace |{{ with
|style=text-align:left; |{{
Replace |''{{ with
|style=text-align:left; |''{{
"c." (circa) indicates "approximately". Sorting will not work correctly if it is in front of the number. So it needs to be moved after the number.