How to Fix Incorrect Row Heights After Sorting in WPS Office Spreadsheets
Question details
The user needs to restore correct row heights in a spreadsheet after sorting, because some rows are too short to display their content and others are unnecessarily tall.

- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- The user sorts a data range or table and then needs the row heights to match the new row contents.
- Observed behavior
- After sorting, row heights remain attached to the wrong positions or stay at previous sizes, leaving some rows too short to show data and others too tall.
Open the worksheet where the row heights are incorrect and make sure the row headers are visible. If you use merged cells, note their ranges because merged cells can prevent AutoFit from resizing rows correctly.
Use AutoFit Row Height to Resize Rows Automatically
Best for quickly restoring row heights based on the visible cell contents after sorting.
AutoFit Row Height recalculates each selected row's height from its tallest cell content. It is the fastest way to correct mismatched row heights after sorting in WPS Office Spreadsheets.
Click the row header of the first affected row, hold Shift, and click the header of the last affected row. You can also press Ctrl + A to select the entire worksheet.
Go to the Home tab, click the Format drop-down menu in the Cells group, and choose AutoFit Row Height.

Set a Specific Row Height Manually
Use this method when you need precise control over row height, or when AutoFit does not produce the expected size.
Check for Merged Cells or Formatting That Blocks AutoFit
Use this method when AutoFit Row Height does not resize some rows correctly after sorting.
Fix Row Heights in WPS Office Spreadsheets After Sorting
Use WPS Office Spreadsheets to restore correct row heights quickly with AutoFit or manual row-height controls. The familiar ribbon layout makes the Home > Format commands easy to find, and the file remains fully compatible with Excel workbooks.
- 1. Open the workbook in WPS Office Spreadsheets: Launch WPS Office and open the .xlsx, .xls, or WPS spreadsheet file that contains the incorrect row heights.
- 2. Select the rows that need to be resized: Click the first row header, hold Shift, and click the last row header in the affected range.
- 3. Apply AutoFit Row Height: Go to Home > Format > AutoFit Row Height to resize the selected rows based on their contents.
- 4. Use manual row height if needed: Right-click the selected row headers, choose Row Height, enter a specific value, and click OK.
- 5. Save the file: Press Ctrl + S or click File > Save to keep the corrected row heights.

Frequently Asked Questions
Why do row heights become incorrect after sorting in Excel?
Sorting changes the order of rows, but row-height formatting can stay attached to the original row positions or remain unchanged. When the cell contents move, the old row heights no longer match the new contents, so some rows appear too short and others too tall.
How do I use AutoFit Row Height in WPS Office Spreadsheets?
Select the affected rows by clicking their row headers, go to Home > Format > AutoFit Row Height. WPS Office then recalculates each selected row height from the tallest cell content.
Why is AutoFit Row Height not working on some rows?
AutoFit may not work correctly when rows contain merged cells, certain vertical alignment settings, or wrapped text combined with fixed row heights. Unmerge the cells or set the row height manually to resolve this.
Can I set an exact row height instead of using AutoFit?
Yes. Select the row headers, right-click the selection, choose Row Height, enter the numeric height in points, and click OK. This gives you a fixed height that does not adjust automatically with content changes.
Does this row-height fix work with files created in Microsoft Excel?
Yes. WPS Office Spreadsheets opens and saves Microsoft Excel files, including .xlsx and .xls, so you can fix row heights and continue working with the same workbook format.




