#0333 – Opening Office documents from Sharepoint online – The file is corrupt and cannot be opened


Today, I do not have a SQL Server blog. Today’s post is about a solution to a problem that I faced recently when working with documents stored on Sharepoint Online.


I had received a new laptop from the IT team and when attempting to edit an Excel file in Excel 2010 directly from Sharepoint, I encountered the following error:



The file is corrupt and cannot be opened.


Root Cause


When a document is opened from the Internet, Office spawns off another program under restricted permissions to open the document. This restricted process will be unable to create temporary files and folders required for Office to open and edit the document.


Solutions


The following solutions can be implemented to resolve the issue:


Solution 01:


If a particular Sharepoint URL is frequently used and trusted, a good alternative would be to Add the URL to the list of Trusted sites in under the browser Options.


Office will trust documents originating from trusted locations and hence these documents will open successfully.


Solution 02:


Follow the steps provided in the Microsoft KB article: http://support.microsoft.com/kb/2387587


Solution 03 (NOT recommended):


Disable Protected Mode (NOT recommended)



  1. Go to File -> Options -> Trust Center
  2. Open the Trust Center window by clicking on the “Trust Center Settings” button
  3. Navigate to the “Protected View” window
  4. Uncheck the following checkboxes:

    • Enable Protected View for files originating from the Internet
    • Enable Protected View for files located in potentially unsafe locations
    • Enable Protected View for Outlook attachments
    • Enable Data Execution Prevention mode

While most blogs and forums suggest that protected mode options should be unchecked, I would not recommend this as it reduces the security enforced by Office.


image



Have you ever encountered this issue? If yes, how did you resolve the error?


Until we meet next time,



Be courteous. Drive responsibly.

Advertisement

Let me know what you think about this post by leaving your feedback here!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.