This article explains how to protect a document with a password in Excel 2019, 2016, 2013, Excel for Microsoft 365, and Excel for Mac.
To configure your workbook so that no one can open it without a password, apply a Document Open password in the Info section of Excel.
With Workbook Open, select File > Info > Password Protect. Select the Protect Workbook drop-down menu, and then select Encrypt with Password.
In the pop-up window, enter a strong password and select OK.