This way of protect did not work for me.
Here is my code snippet:
_wb = new XLWorkbook();
var ws =_wb.Worksheets.Add(finalDataTable, "Data Export");
ws.Protect("passw0rd!");
var path = ExportFilePath;
_wb.SaveAs(path);
After saving the workbook when I open the spreadsheet, it just opens up without any password prompt.
↧