Header field button like in excel

Hi, I imported an excel file and it appeared to have buttons in all header fields which allow, among more, to sort the sheet on that column, independent of any selection having been made.

How can I realize this a new OpenDocument spreadsheet?
Having a look at contents.xml, I can realize this by inserting, at the end:

  <table:database-ranges>
    <table:database-range table:name="someName" 
        table:target-range-address="'Sheet1'.A1:'Sheet1'.C5" table:display-filter-buttons="true">
      <table:sort>
        <table:sort-by table:field-number="0" table:order="descending" table:data-type="automatic" />
      </table:sort>
    </table:database-range>
  </table:database-ranges>

This works, but what is the canonical way to do it?

What about:

Click into the data area > Data > Filter > Auto Filter

This gives you a drop down button in each data column which allows you to sort and filter whatever you like.