Protecting a file is much more difficult compared to protecting a program executable file. You can set a password for a spreadsheet but if you are selling it then the purchaser will have the password and can give or sell your spreadsheet to someone else.
Excel has a feature to protect VBA code from being viewed. If the ideas you want to protect are done through VBA then the way you carry out the operations can be hidden but the spreadsheet can be used by anyone who has the file. There are third party programs that give a high level of protection to Excel spreadsheets. One, XLS Padlock, (https://www.xlspadlock.com/) compiles the Excel spreadsheet into an executable file. This is a commercial program and has to be bought. When run it requires authorisation to run and then opens the spreadsheet in Excel, which must be installed on the computer. I am not aware of any program that can be used to secure a LO Calc file.