I had similar problems and discovered a solution.
Start Excel in administrator mode. Find the actual executable excel.exe in Windows explorer, right-click it and select "Run as Administrator." If you don't see that option on the menu it may be that you aren't allowed to run as administrator. If that's the case, check with your IT Department if there is one. For me, this wou8ldn't work on the shortcuts in the start menu or elsewhere on my computer. I had to actually find the executable.
Once you have started excel in administrator mode, then open the file and try running your program again.
Note that out of the thousands of files I tried to delete, where I previously got this error, I still got a permission error on a few of them, so I know this isn't a 100% solution.
I had similar problems and discovered a solution.
Start Excel in administrator mode. Find the actual executable excel.exe in Windows explorer, right-click it and select "Run as Administrator." If you don't see that option on the menu it may be that you aren't allowed to run as administrator. If that's the case, check with your IT Department if there is one. For me, this wou8ldn't work on the shortcuts in the start menu or elsewhere on my computer. I had to actually find the executable.
Once you have started excel in administrator mode, then open the file and try running your program again.
Note that out of the thousands of files I tried to delete, where I previously got this error, I still got a permission error on a few of them, so I know this isn't a 100% solution.