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: Word Online works seamlessly with Word and other Office desktop programs, and we update it based on input like yours. For the latest feature announcements, visit the Office Online blog.