Libre office 3.6.4 Calc sorts column labels into data

I have a spreadsheet with column headings in row 1. When I select-all and click Data>Sort, the Sort Criteria tab shows Columns A, B, etc; I click the Options tab, check in the box “Range contains column labels”, click back to the Sort Criteria tab, and now it shows the column labels; I select a label, click Sort, and ALL the rows are sorted, INCLUDING ROW 1 with the column labels.

This did not happen in LO 3.4. Is it a bug? Is there something I can do to prevent it?

Having to manually select ‘All but the top row’ and sort by column letter is do-able but not very handy.

@Eliz, assume you mean LibO 3.5.4

@vsfoote, this bug is only in 3.6 series. In 3.5.4+ it works as expected.

I have the same problem using LO on Ubuntu. I can click “Range contains column labels”, but when I sort then the first row is again sorted into the other rows. Have to say, I’m using an Excel workbook.

This is still a problem in Version:, Build ID: 686f202eff87ef707079aeb7f485847613344eb. Please reopen this issue

It’s been solved: Changes made to bug 53482

I’ve just tried with last ver of LibreOffice (3.6.3) on MacOsX and the problem doesn’t come up any more.


  • fdo#54160 has current status of RESOLVED DUPLICATE of fdo#53482
  • fdo #53482 has current status of RESOLVED FIXED

Make the Select All (+A) selection first, and then in Calc menus select the Data → Sort → Options – “Range contains column labels” check box.

Here is the key: Column labels are not limited to Row 1, just the first row of the selected range of cells.

So, within a spreadsheet “Range contains column labels” for sorting is determined when working with a selected Ranges of cells, and again is independently determined when using the Select All. They use the same options checkbox for Column labels, but function differently, e.g. Select All is a unique set, but multiple ranges of selected cells can be sorted (and need to identify if they have column labels).

Within a spreadsheet, once set the Select All setting is statefull and remembered. But as you establish additional selected ranges you need to set sort option if “Range contains column labels” for each new range. And each spreadsheet can have multiple working ranges defined and saved with it.

The “Contains column labels” for each range of cells and the Select All case can be independently toggled.

Column label value is unchecked by default for a new spreadsheet, for the Select All case, and for each new range. Have to be careful about what range of cells or if Select All is selected for the sort operation.

I experience this same issue on for Windows. I don’t understand the other answer offered. Isn’t the top-most row of the selection used as the column label? Either way, my column labels are in row 1 and it does not matter if I select a range of cells or select all. The column labels are still sorted into the data.

I am pretty sure this is a bug.

Checking “Range contains column labels” makes it possible to use those labels in the drop down of which columns we want to sort by.

But there is no reason that the column label row should be sorted in with the regular rows.

I’ve got the same problem. I know how to use sort, but it is broken. I just moved from over to Libre Office. I think I made a mistake. I’m using LO

Known bug:

  1. do not select the entire sheet but only the columns you want to sort.
  2. all sorted columns must have a header if one column has a header