SharePoint 2013 Excel File Won’t Open in Browser

While I had this problem in SharePoint 2013, this could also apply to SharePoint 2010. Another detail to note, especially when you look at the screen shots, is this was SharePoint 2010 upgrade to 2013 and the visual upgrade hadn’t been performed yet. I’m honestly not sure if this happens with every upgrade as I’ve never had this issue before but would be curious to hear if anyone else has seen this same thing.

First of all, to give credit where credit is due, this forum post pointed me in the direction.

The Issue

A client of mine had a BI site containing several PowerPivot workbooks (in a PowerPivot gallery) as well as several Excel files in just a document library. The PowerPivot workbooks opened just fine in the browser, however, the Excel files in document libraries opened in the Excel Client by default. If I clicked the file menu and then selected to open in browser it worked fine, so it wasn’t an issue with the Excel Service account permissions.
I tried:

  1. Make sure the file is an .xlsx file (not .xls)
  2. Activating/Deactivating the site collection feature to Open Documents in the Client Application by Default.
  3. Changing Document Library settings for how to open documents and changing it back.
  4. Setting the Web Application file handing property to permissive instead of strict (this shouldn’t have any effect but I was grasping at straws)
    Nothing worked…no matter what I did they kept opening in the client.

The Fix

Based on the link above, I went to go find the serverfilesExcelServer.xml file in my hive. You’ll notice SharePoint 2013 has both a 14 hive (SharePoint 2010 “mode”) and a 15 hive (SharePoint 2013). In the 15 hive, the file is there and looks good.
https://i1.wp.com/k0kkyw.dm2301.livefilestore.com/y2pqU2KF3hNRI5cSt6NfimMqWDeKWWcR31GIo_M6209tKtf39Gislx0pdf6ikhws8swNjHZK7zLaIg1hb9RZ73osXn_OzsUevSw79KhVV9h3AE/XMLFileExistsIn15Hive.png?w=1200&ssl=1

https://i0.wp.com/k0kkyw.dm2301.livefilestore.com/y2p-ESfUYMcaLIQAPcjHLdiZU2h5KAogH0Z3ps6Z504-JocIWGHFoLfTSDJWo_0tE5EZ9rX430GjBwJnwi8PMptthyJWA2vstsRxyMDlh1FYHU/serverfilesExcelServer.png?w=1200&ssl=1
But the file is actually missing in the 14 hive! It’s just not there.
https://i1.wp.com/k0kkyw.dm2301.livefilestore.com/y2peDwGBJftPxZnDMN8ilSEZsw2GSumk8Lrv-LdF-JW5SYptHQjqryMftsaBuH_hjl5An98_9E__Ow19brrphzUaza7NVcQI12ciBe6DPeijJQ/XMLFileMissingIn14Hive.png?w=1200&ssl=1
So I just copied the file from the 15 hive to the 14 hive, performed and iisreset and everything started working!

A Few More Details

Just a few more details that made this even more strange

  1. We stood up 3 brand new environment (Development, QA and Production) and just did a database attach upgrade. Development and QA both had this problem, the production environment was completely fine and all the files were there.
  2. All the farms have 2 SharePoint Server (App and Web). In both Development and QA this file with missing on both of the servers.

So, I’m not sure if someone this file got deleted from both servers in both environments. If so, why or how it got deleted. Or if the file was never there in the first place. If so, why just in two environments and not all three. It was definitely a new issue for me and one I had to dig a little to find the solution for, so hopefully this helps someone else.