With Word Online you can add tables to your document, but to sort the table contents you need to open and edit the document in the desktop version of Word.
Click Edit Document > Edit in Word, or click Open in Word.
Then follow the instructions in Sort the contents of a table.
When you save the document in the desktop version of Word and reopen it in Word Online, you’ll see the changes you made.
Tip: Got a suggestion for this feature?
Vote for an idea, or share a new one in our suggestion box at word.uservoice.com.