This project has moved. For the latest updates, please go here.

How to unprotect a file after opening it ?

Mar 24, 2015 at 7:20 AM
Edited Mar 24, 2015 at 7:21 AM
Hello,

I'm brand new to EPPlus...
I have an xls file which has some protected cells in it. I can open the file for read without the password but I need the password in order to edit the file.
The thing is that the password is a database on my server and I need a hidden value from the file in order to get the password from the database.

So my question is, how can I insert the password to unprotect the file after it is alread open ?
The only place to insert the password is in the constructor of the package:
ExcelPackage package = new ExcelPackage(fileInfo, password)