I'm experiencing this issue myself. I've tried many ways of trying to kill off the object and failed. I'm using V18.104.22.168, .Net 4 C# with no other libraries other than the .Net ones.
I first open my "InquirySheet.xlsm", change the values in certain cells and then fire a SaveAs using a different filename.
This all works perfectly until, I decided to run the process again with out closing the application down despite using this:
"using (ExcelPackage pck = new ExcelPackage(FInfo))"
wrapped around my code to change the values then finally save as. When I re run this I get
"The process cannot access the file 'C:\Dev\MarelConfigurator\Configurator\Configurator\ProductFiles\InquirySheet.xlsm' because it is being used by another process."
The only way I can reopen this file is to close the application fully and then re open it. It's nothing to do with the classic Visual Studio keeping locks on files either, I've checked this as a deployed package on a clean
Windows XP SP3 machine and the same exception occurs.
Please can someone point me in the right direction? Otherwise it's back to the old Office PIA's and they're nasty, really nasty. Other than that everything else is great and works as it says on the tin!
Kind Regards, Dan R