Tuesday, March 20, 2012

Excel Web Access Web Part Errors in Sharepoint 2010

After migrating content from one Sharepoint installation to another, content meant to display in an Excel Web Access Web Part was throwing errors. The first required going into Central Administration and adding the entire website to the Trusted File Location for the Excel Service Application.

This was done by going to Manage Service Applications, Excel Services Application, Trusted File Locations, and adding the root URL to the list.

The second error displayed to the user as:
The workbook cannot be opened.
I searched for that phrase on Google and came across a blog post that suggested checking the Event Viewer for more details. In Event Viewer, the details included:

'Unable to open workbook due to unexpected exception: Microsoft.Office.Excel.Server.Host.HostFileException ---> System.Data.SqlClient.SqlException: Cannot open database "SP_Content" requested by the login. The login failed.
Login failed for user 'DOMAIN\spservices'.

The blog post referenced another very useful blog post: http://blogs.msdn.com/b/jjameson/archive/2010/05/04/the-workbook-cannot-be-opened-error-with-sharepoint-server-2010-and-tfs-2010.aspx

I opened PowerShell and ran the following two lines of code:

$w = Get-SPWebApplication "http://domain.com"

$webApp.GrantAccessToProcessIdentity("DOMAIN\spservices")

Now, the Excel Web Access Web Part seems to be working as it did in the old site.

No comments:

Post a Comment