Password Protected Excel Download using EPPLUS

前端 未结 4 684

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.

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-02 21:50

    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

提交回复
热议问题