If you are getting this error when trying to view a workbook/document in a document library (whether by default or by manual choice), there are a couple of lines you can run in SharePoint PowerShell that can take care of this. This is assuming, of course, your document is allowed to be viewed in a browser.
First, you need to capture the name of your site in a variable:
$App = Get-SPWebApplication "YourURLGoesHere"
Naturally, you can use any name after the ‘$’ sign for your variable.
The next part gets a little tricky. You need to go to the server itself and open IIS and find the service identity for the next PS line. Then, open the Application Pools section, and find the service identity used. This may or may not be the exact one assigned to your web application. If you try that and you still get the error, look to see if there’s a separate pool for something like ‘Sharepoint-80′ and use that identity.
Go back to PowerShell and type in the following, using the Service Identity you located previously:
Once you finish this process, you should easily be able to open your documents in the browser.
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF