0

I am able to export Excel file from html table using JavaScript in my ASP.NET MVC project. Now I want excel file will be password protected. Can I do this using javaScripts or C#.

Jackdaw
  • 7,626
  • 5
  • 15
  • 33

1 Answers1

0

This can be done using the password property of the workbook object.
See this, Implementing Password Security on Excel Workbooks Using Visual Studio .NET.
You will need to do a translation from the vb.net code to C#.

Joshua Ooi
  • 1,139
  • 7
  • 18
  • I want to implement it during the generate excel from html. Is it possible to do this in javaScripts. – Muhammad Jahid Hasan May 06 '21 at 06:48
  • @MuhammadJahidHasan I dont think that is possible. You can refer this [Make CSV Password Protected using Javascript](https://stackoverflow.com/questions/32687992/how-can-i-make-it-csv-file-password-protected-using-javascript) – Joshua Ooi May 06 '21 at 07:09