Export password protected Excel file and encrypt Excel file using EasyXLS library! XLS, XLSX, XLSM, XLSB file in .NET.
https://www.easyxls.com/manual/tutorials/vb-net/encrypt-excel-file.html