Sort and restore row order

Click a column’s arrow button to cycle through ascending, descending and unsorted.

Sort with one click

Click the arrow button on the right of the desired column heading. Each click advances to the next state:

  1. Ascending: a bold upward arrow.
  2. Descending: a bold downward arrow.
  3. Unsorted: both arrows; the original order is restored.

Clicking another column starts it in ascending order. No menu opens. Komma CSV always uses natural text sorting: for example, A2 comes before A10. Decimal numbers, signs and currency amounts are not interpreted as mathematical values.

Sorting moves complete rows so related values stay together. It affects all data rows regardless of their checkboxes. An enabled header row stays at the top. Empty values stay at the bottom in either direction. Equal values retain their previous relative order.

For keyboard access, use Sort A–Z and Sort Z–A under Table → Sort Current Column. Right-click a column heading to insert, delete or move that column.

Return to the original order

Click the active column’s sort button until both arrows appear, or choose Table → Restore Original Order. Komma CSV restores the order before the first actual reordering in the currently open document, even after multiple sorts.

  • Later cell edits are preserved.
  • Deleted rows stay deleted.
  • Rows inserted while the order differs from the original are appended at the end.
  • Rows inserted after restoring the order retain their insertion position in the baseline.

The baseline is kept only for the current session. After closing and reopening, the saved file’s order becomes the new starting point. You can also undo a restoration with ⌘Z.

Manually moving rows up or down ends this sort and clears its saved baseline order. Use ⌘Z to undo the move. A subsequent new sort uses the manual order as its baseline.