Try this in excel:
1) import text in one column (A)
2) use in the second column function: =len(a1)
3) drag edge of cell to fill all cells of B column with: =len(a2), len(a3), ... etc.
4) select A and B columns
5) Data->Sort
6) select Sort by: B
7) select Then by: A
And that's all.