Skip to content

How to sort and filter rows in an Excel or CSV spreadsheet

Open an .xlsx or .csv in DocFila, sort A to Z or by several columns, filter rows by value, freeze the header row and save without disturbing the file.

Open DocFila free

The short answer

Open the .xlsx or .csv in DocFila, select a cell in the column, open Sort rows and choose Sort A to Z or Custom sort. Turn on Filter rows to hide the rows you do not want, and use Freeze top row so headings stay visible while you scroll.

Works on: The workbook grid in the desktop apps, the web Workspace and the phone apps. It opens .xlsx, .xls, .csv, .tsv and .ods. A .xls or .ods file saves as a new .xlsx beside the original.

What do you need?

What are the steps?

  1. Open the file. Open the spreadsheet. A .csv shows as a table; choose Show as text to see the raw lines and Field separator to pick Comma, Semicolon, Tab character or Vertical bar if columns look wrong.
  2. Freeze the header. Open Freeze panes and choose Freeze top row, or Freeze first column. Unfreeze panes undoes it.
  3. Sort by one column. Click a cell in the column and open Sort rows. Choose Sort A to Z or Sort Z to A.
  4. Sort by several columns. Choose Custom sort, tick My data has headers, set Sort by with A to Z or Z to A, and use Add level for Then by columns.
  5. Switch on filters. Choose Filter rows. Each column header gets a filter control, labelled Filter this column.
  6. Choose what to show. Open a column's filter, use Search values or tick items, including (Blanks). A line reads Filtered: 12 of 40 rows so you know the view is partial.
  7. Clear and save. Use Clear filter from this column or Remove filter, then save. The file keeps everything DocFila does not model.

What is worth knowing?

What DocFila does not do here

Filters and sorts are view and order changes on the sheet; they are not database queries. A .xls or .ods cannot be written back in its own format here, so saving makes an .xlsx copy next to it. Features DocFila does not model are kept but not editable.

Where to go next

More word, excel and powerpoint how-to guides

Questions

Does sorting change my original file?

Sorting reorders the rows in the sheet, and saving writes that order into the file. Keep a copy first if you need the old order, or use Version history to go back to an earlier save.

Can I sort by two columns?

Yes. Choose Custom sort, set the first column under Sort by and add another with Add level, which appears as Then by. Each level can run A to Z or Z to A.

Why do my CSV columns all land in one column?

The file uses a different separator than the one assumed. Open Field separator and choose Semicolon, Tab character or Vertical bar until the columns split correctly. Show as text lets you check the raw line.

Try it in DocFila

Free to start, no card needed.