We are using ClosedXML library to generate our excel reports. A new requirement form client is to password protect reports marked as confidential. There is a method XLWorkbook.Protect() with some overloads, however, none of it is encrypting a file, just locking structure at best. In other words, you can still see data after opening a file, MS Excel will not ask you for a password.
Thanks
After some try/fails and code disassembling I realized that ClosedXML is not supporting encryption at all; at least I was unable to find trace of it. Maybe they will add it later. We were able to convince client to give us a time to refactor the code and we are using EPPlus now.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.