Press F12 (or use Data -> Group and Outline -> Group)
Fix header row etc
Rows and columns can be fixed with View -> Freeze Rows and Columns (which typically used to display a header row).
Formatting dates, numbers and/or text
Menu Format -> Number Format can quickly choose among some formats but is not very flexible to display a number, for example, with three decimal places.
Menu Format -> Cells then Number tab allows to format numbers with more flexibility.
Change column width and row height so that data in cells is not hidden
Select columns or rows, right click, then Optimal width/height.
Alternatively, double click on «gap» between columns/rows.
Enable large spreadsheets
By default, Calc has a limit of 1K columns (AMJ) and 1M rows.
This limit can be lifted in the Menu Tools -> Options -> Libre Office Calc -> Defaults: Enable very large spreadsheets: 16K columns (XFD) and 16M rows.
After changing this option, it seems that Calc has some problems opening spreadsheets that were created without this option.
Sub SortRange
dim range as Object ' ScCellRangeObj
dim sortDesc(0 to 8) as Object
dim sortCols(0 to 2) as New com.sun.star.table.TableSortField
range = ThisComponent.Sheets.getByName("SheetName").getCellRangeByName("RangeName")
sortDesc = range.CreateSortDescriptor
sortCols(0).Field = 5 ' 0-based
sortCols(1).Field = 3
sortCols(2).Field = 2
sortCols(0).IsAscending = True
sortCols(1).IsAscending = True
sortCols(2).IsAscending = True
sortDesc(1).Value = False ' No header
sortDesc(3).Value = sortCols
range.Sort(sortDesc)
End Sub