I am exporting data in Excel form using EPPLUS Excel Library. I want that when excel downloaded it will ask for password. I have tried following code.
It's not documented, but you can do as following:
package.Encryption.Password = "your password here";
Then serve your package with Save() or GetAsByteArray() of your choice
Save()
GetAsByteArray()