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.
Just need to use the .Save overload with a password as the option:
.Save
package.Save("password");
Response To Comments
To apply a password if saving via a byte array it is very similar:
byte
Byte[] bin = pck.GetAsByteArray("password"); System.IO.File.WriteAllBytes(fullFilePath, bin);