As part of our rollout of Office 365, we had a few users report that after the automated process to uninstall Office 2016 and install Office 365, they could not open some files from our SharePoint 2013 servers. The affected users could not use the “Open in App” feature. They would get the error “We’re sorry Excel cannot open .. <Filename>”. and then an error stating that the file was either missing or corrupt or open in another application. This one stumped us for a bit, and the old Google-Fu wasn’t helping much.
Here were our steps and the resolution.
First, diagnostically, we utilized the old “Wolf in Siberia” tactic of isolating the problem.
- It wasn’t all users, but not just one, either. Therefore, not a problem with the software package.
- The file could be opened in the browser in both view and edit mode and could be downloaded and opened. Therefore the file wasn’t corrupt.
- Other users could open the file without a problem. So, not a SharePoint problem.
- We had the user log into a different computer to see if the user profile or SharePoint permissions were a problem. They could open the file without error. So the issue was on their pc.
- We logged into the user’s computer as a different user and could open the file.
So the problem was specific to that user on that PC!
Considering the error stated that one of the possible causes was “the file is open in another application,” we started looking for a cache or flag saying the file was open for editing. First, we did the easy one and ran a disk cleanup on the main drive emptying temp folders and internet caches. No luck. So we did some internet searching and found several ways to clear the Office cache in earlier versions but not Office 365! Finally, we broadened the net and searched simply for Office 365 cache without any specific error and hit upon a post about a Teams issue that was resolved by deleting the files in the cache folder. Eureka!
So, after all of that, the solution is straightforward. Close all Office programs, then delete all the files in “%systemDrive%\Users\%userprofile%\AppData\Local\Microsoft\Office\16.0\OfficeFileCache\”.
There is one caveat – be careful. In our tests, we found at least one user whose cache folder had a “1” appended (OfficeFileCache1).