Skip to content
This repository was archived by the owner on Mar 9, 2020. It is now read-only.

Conversation

@ZakkyR
Copy link

@ZakkyR ZakkyR commented Oct 19, 2019

An error "Error saving file {file path}" occurred when saving an encrypted file.

using (ExcelPackage pck = new ExcelPackage(new FileInfo("path/to/encrypted/file.xlsx"), true, "password"))            
 {
    // Excel operation processing

    pck.Save(); // Error saving file path/to/encrypted/file.xlsx
 }

The process was locked because there was a file stream that was not closed.
The error disappeared when I corrected it.

You can test with "EPPlusTest.Encrypt.ReadWriteEncrypt()".

I am glad if you merge because it is necessary for business.

@ZakkyR ZakkyR changed the title Close encrypted file filestream Close encrypted filestream Oct 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant