I have a worksheet with 13076 rows and 12 columns.
After a sort the worksheet only contains 11984 rows.
Are there limitations on the size of the worksheet for sorting?
Nothing special (except for the size limitations of the output file formats, but your 13000 rows are still far away from the smallest rowcount of Excel 2.1, and xlsx allows even more than 1 million rows).
Is your application 32bit, and you are running out of memory?
In the attached project I am creating a spreadsheet with random strings in 50,000 rows and 50 columns (it will take some time...), and I am not seeing any loss of rows.