Enable Natural Sort by Default

Is it possible to enable natural sort by default so that I do not have to go to option every time I want to sort a column?

Define a named database range via menu:Data>Define…
Do the natural sort. All the sort options are stored in the definition of the database range.
Next time: menu:Data>Refresh

1 Like

… except for the Natural sorting option. :disappointed:

Please try: Quick Sort Macros » Libreoffice Extensions
It consists of a macro and a toolbar with 2 buttons for ascending and descending quick sort.
Click any single cell in the database range you want to be sorted by the column having the active cell and then the quick sort button on the toolbar. If there is no database range under the active cell, the macro calls the built-in quick sort command (which does not read any options from any database range and which does not detect any header row if all the columns have text).

Edit: The natural sort option is not stored with the document. Therefore my extension fails to sort naturally after reloading the document.

Natural sort works with my extension Quick Sort Macros » Libreoffice Extensions, which reads the options from a database range’s SortDescriptor.
EDIT: Until you save and reload the file.

Since the natural sort option is not stored in the document, you may add a calculated column =VALUE(REGEX(A2;"\d+")) which extracts the numeric part and sort by that column.

https://bugs.documentfoundation.org/show_bug.cgi?id=161948

tdf#161948

2 Likes