Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a calendar list with attachments enabled. When i attach an XLS file to an event, SharePoint wants to open it in xlviewer.aspx, but throws an error every time. I don't want to open the file in a browser. I just want to download the file directly. How can i disable the xlviewer?

The problem is similar to the problem described here, except that these affect attachments, not a document library. The list does not have a "browser" setting that i can see. The file handling in the application is set to "permissive."

share|improve this question
add comment

1 Answer 1

You can try this powershell script and run it on the web front end / application server

$defaultOpenBehaviorFeatureId = $(Get-SPFeature -limit all | where {$_.displayname -eq "OpenInClient"}).Id

Get-SPSite -limit ALL |foreach{ Enable-SPFeature $defaultOpenBehaviorFeatureId -url $_.URL }

Or save it as disableopeninbrowser.ps1 and run it through command line as administrator.

This will essentially enable all documents including excel files to be downloaded and opened in the client application rather than in the browser.

You can modify this script to make it web application specific. Running this script will effect the entire farm (all web applications and site collections) so make sure you test this on a test server before trying it on a production server.

share|improve this answer
    
Apologies for my ignorance. I pasted your powershell script directly into the SharePoint 2010 Management Shell. I get the following error: Unexpected token 'Get-SPSite' in expression or statement. –  Markus May 23 '12 at 17:34
    
Hi Markus, Here is the step by step breakup: 1. Open notepad and paste the script. 2. Save it as disableopeninbrowser.ps1. 3. Open SP Management Shell as adminstrator. Traverse to the folder where you saved the disableopeninbrowser.ps1. 4. Run the script like this C:\>.\disableopeninbrowser.ps1 If you follow the steps correctly it should work just fine. –  Arko D May 24 '12 at 7:21
    
The steps above give me the same error, i am afraid. –  Markus May 24 '12 at 13:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.