How do I set multiple rows as a header in calc?

How do I set multiple rows of a spreadsheet to:

  1. Freeze at the top of the screen, and

  2. Print at the top of every printed page?

https://help.libreoffice.org/latest/en-US/text/scalc/guide/line_fix.html

Additionally to freezing rows in the view, for repeating column headers in prints see Printing Rows or Columns on Every Page