Answered by:
XLSX files won't open in browser

Question
-
I seem to have the exact opposite problem of most people here.. I'm trying to get XLSX files to open using the browser / Excel Web Services rather than opening in the native Excel (Office 2010) client. In our test environment, this works fine. If I click on the file in opens in the browser. In production, it will only open in Excel.
Both environments are configured the same in (for every setting I've checked anyway). In Central Admin, the Excel service applications are also the same; the trusted locations, libraries, etc. are configured. The document library is configured to "Use the server default (Open in browser)" and the Site Collection feature "Open Documents in Client Applications by Default" is DISABLED. There's no error message presented to the user, or in the logs. The hostnames for both test and production environments are in IE's Local Intranet Zone.
The best part is, that if I manually enter the path to the Excel viewer (in prod) in the address bar (eg. http//myhost/_layouts/xlviewer.aspx?id=/Reports/MyReport.xlsx); the file will open without issue - it just won't do that by default.
We're running SP2010 April 2012 CU x64 on Win2K8 R2 x64. Users are on using IE8 on either XP on Win7.
Can anyone think of anything that I may have missed looking into?
Thursday, October 4, 2012 5:03 PM
Answers
-
So it turns out that in our production environment; there was a file called serverfilesExcelServer.xml in the 14 hive (..\14\TEMPLATE\XML\serverfilesExcelServer.xml) which had been manually edited and the following lines were commented out:
<Mapping FileExtension="xlsx" RedirectUrlTemplate="/_layouts/xlviewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate="/_layouts/xlviewer.aspx?new=1" /> <Mapping FileExtension="xlsb" RedirectUrlTemplate="/_layouts/xlviewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate="/_layouts/xlviewer.aspx?new=1" /> <Mapping FileExtension="xlsm" RedirectUrlTemplate="/_layouts/xlviewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate="/_layouts/xlviewer.aspx?new=1" />
Once we uncommented out the lines and reset IIS, it works as expected. WHY they were commented out in the first place I'll probably never know..
- Marked as answer by CJRP Monday, October 15, 2012 2:26 PM
Monday, October 15, 2012 2:26 PM
All replies
-
The Strict/Permissive thing in Web application settings?
Willner001
Friday, October 5, 2012 11:58 AM -
No. In both environments file handling is set to permissive.Friday, October 5, 2012 2:16 PM
-
Group policy that is comming into play? IE your dev environment isn't on the same list as production?
Willner001
Friday, October 5, 2012 2:37 PM -
Not that either. All the SharePoint servers, regardless of environment, are in the same OU and get the same polices applied.Friday, October 5, 2012 2:46 PM
-
when you say that the xlsx file opens in client application in production environment, do you mean that it is first downloaded to temporary internet folder and opened locally, or javascript will call the SharePoint spreadsheet launcher to open Excel application?
You can check for events associated with the excel document link with browser developer tools.
Monday, October 8, 2012 5:47 AM -
The client is prompted with a dialog to open the file in read-only or edit mode; and then Excel launches.Wednesday, October 10, 2012 2:02 PM
-
that means the document open control is working. Your click on the link called trigger some javascript to call the document open control.Thursday, October 11, 2012 2:17 AM
-
That may be, but the expected response is that the file will open in the browser using web services. There are two identically configured environments (as far as we can tell); one works as expected; the other (production) opens using the Excel desktop client.Thursday, October 11, 2012 1:52 PM
-
the "identical" keeps throwing me. Try this
Get-SPExcelServiceApplication | Format-list *
May be worth reading the blog and nosing arround with some of the powershell commands. Something may be different in the service application set up.
Willner001
Thursday, October 11, 2012 4:35 PM -
Hi Brian;
Here's the output from the two environments. Other than the GUIDs, server / database names and which are obviously different; the "version" is the first difference I've found between the two environments. I've checked both environments however and all servers are reporting that they are at version 14.0.6120.5006 and none -f the servers or databases indicate there are any items left to be upgraded.
Oh, and I see that the service application names are slightly different too, but that should be inconsequential.
UAT OUTPUT
========================================
UnattendedAccountApplicationId : ExcelServicesUnattendedAccount
ExternalDataConnectionLifetime : 1800
LoadBalancingScheme : WorkbookUrl
SessionsPerUserMax : 25
PrivateBytesMax : -1
MemoryCacheThreshold : 90
UnusedObjectAgeMax : -1
WorkbookCache :
WorkbookCacheSizeMax : 40960
CachingOfUnusedFilesEnable : True
FileAccessMethod : UseImpersonation
EncryptedUserConnectionRequired : None
CrossDomainAccessAllowed : False
TerminateProcessOnAccessViolation : False
SiteCollectionAnonymousSessionsMax : 25
ThrottleAccessViolationsPerSiteCollection : 0
TypeName : Excel Services Application Web Service Application
ApplicationClassId : 789dc740-89e9-4702-bcd6-32f81ede90fa
ApplicationVersion : 14.0.0.0
ManageLink : Microsoft.SharePoint.Administration.SPAdministrationLink
Shared : False
IisVirtualDirectoryPath : SharePoint Web Services\9a3b01e59d1d45dab6fdea1a63f62597
ApplicationPool : SPIisWebServiceApplicationPool Name=SharePoint Web Services Default
PermissionsLink : Microsoft.SharePoint.Administration.SPAdministrationLink
Endpoints : {http, https}
DefaultEndpoint : SPIisWebServiceEndpoint Name=http
Uri : urn:schemas-microsoft-com:sharepoint:service:9a3b01e59d1d45dab6fdea1a63f625
97#authority=urn:uuid:b4bf4ac1fadf4037b8513350220fe4cf&authority=https://UA
TSERVER:32844/Topology/topology.svc
Comments :
TermsOfServiceUri :
Service : ExcelServerWebService
ServiceInstances : {, , , }
ServiceApplicationProxyGroup : SPServiceApplicationProxyGroup
PropertiesLink :
CanUpgrade : True
IsBackwardsCompatible : True
NeedsUpgradeIncludeChildren : False
NeedsUpgrade : False
UpgradeContext : Microsoft.SharePoint.Upgrade.SPUpgradeContext
Name : Excel Services Application
DisplayName : Excel Services Application
Id : 9a3b01e5-9d1d-45da-b6fd-ea1a63f62597
Status : Online
Parent : ExcelServerWebService
Version : 4200580
Properties : {}
Farm : SPFarm Name=UAT_SharePoint_Configuration_Database
UpgradedPersistedProperties : {}========================================
PROD OUTPUT
========================================
UnattendedAccountApplicationId : ExcelServicesUnattendedAccount
ExternalDataConnectionLifetime : 1800
LoadBalancingScheme : WorkbookUrl
SessionsPerUserMax : 25
PrivateBytesMax : -1
MemoryCacheThreshold : 90
UnusedObjectAgeMax : -1
WorkbookCache :
WorkbookCacheSizeMax : 40960
CachingOfUnusedFilesEnable : True
FileAccessMethod : UseImpersonation
EncryptedUserConnectionRequired : None
CrossDomainAccessAllowed : False
TerminateProcessOnAccessViolation : False
SiteCollectionAnonymousSessionsMax : 25
ThrottleAccessViolationsPerSiteCollection : 0
TypeName : Excel Services Application Web Service Application
ApplicationClassId : 789dc740-89e9-4702-bcd6-32f81ede90fa
ApplicationVersion : 14.0.0.0
ManageLink : Microsoft.SharePoint.Administration.SPAdministrationLink
Shared : False
IisVirtualDirectoryPath : SharePoint Web Services\047eb0cd285a4372b729f76cfa67e969
ApplicationPool : SPIisWebServiceApplicationPool Name=SharePoint Web Services Default
PermissionsLink : Microsoft.SharePoint.Administration.SPAdministrationLink
Endpoints : {http, https}
DefaultEndpoint : SPIisWebServiceEndpoint Name=http
Uri : urn:schemas-microsoft-com:sharepoint:service:047eb0cd285a4372b729f76cfa67e9
69#authority=urn:uuid:8363d212639f4c16b83eec71930c4c91&authority=https://PR
ODSERVER:32844/Topology/topology.svc
Comments :
TermsOfServiceUri :
Service : ExcelServerWebService
ServiceInstances : {, , , ...}
ServiceApplicationProxyGroup : SPServiceApplicationProxyGroup
PropertiesLink :
CanUpgrade : True
IsBackwardsCompatible : True
NeedsUpgradeIncludeChildren : False
NeedsUpgrade : False
UpgradeContext : Microsoft.SharePoint.Upgrade.SPUpgradeContext
Name : Excel Services
DisplayName : Excel Services
Id : 047eb0cd-285a-4372-b729-f76cfa67e969
Status : Online
Parent : ExcelServerWebService
Version : 4011076
Properties : {}
Farm : SPFarm Name=PROD_SharePoint_Configuration_Database
UpgradedPersistedProperties : {}========================================
Thursday, October 11, 2012 4:55 PM -
So it turns out that in our production environment; there was a file called serverfilesExcelServer.xml in the 14 hive (..\14\TEMPLATE\XML\serverfilesExcelServer.xml) which had been manually edited and the following lines were commented out:
<Mapping FileExtension="xlsx" RedirectUrlTemplate="/_layouts/xlviewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate="/_layouts/xlviewer.aspx?new=1" /> <Mapping FileExtension="xlsb" RedirectUrlTemplate="/_layouts/xlviewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate="/_layouts/xlviewer.aspx?new=1" /> <Mapping FileExtension="xlsm" RedirectUrlTemplate="/_layouts/xlviewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate="/_layouts/xlviewer.aspx?new=1" />
Once we uncommented out the lines and reset IIS, it works as expected. WHY they were commented out in the first place I'll probably never know..
- Marked as answer by CJRP Monday, October 15, 2012 2:26 PM
Monday, October 15, 2012 2:26 PM -
- As mentioned the user was having the opposite problem as most other users. This is how I resolved the opposite problem. Perhaps changing these settings is what commented out the serverfilesExcelServer.xml in the 14 hive?
- Navigate: Site Actions –> Site Settings
- Click the Site Collections Features link located under the Site Collection Administration section of the page
- Locate and active the Open Documents in Client Applications by Default
- Edited by Rogues Monday, October 22, 2012 10:25 PM
Monday, October 22, 2012 10:25 PM