Apr 02 2013

The workbook cannot be opened – SharePoint 2010 (error fix)

While publishing a Excel Sheet from Microsoft Excel 2010 to my local development SharePoint Server 2010, I got this error on the browser – “The workbook cannot be opened“.

Quick steps to publish Excel data into SharePoint: File -> Save & Send -> Save to SharePoint -> (Select your location) – (Use Publish Options to select the scope of excel data)

Workbook cannot be opened error in SharePoint 2010

By the way, I used the instructions in Chapter 1 of Real World SharePoint 2010 book to build my SharePoint 2010 virtual machine for development.  I guess I created multiple AD users (sp_farm, sp_serviceapp, sp_apppool,  SQL_service) and messed up with some settings. Let us forget the past and move ahead to troubleshoot the above error.

  1. Quickly searched Internet and got multiple ways to resolve this problem.  I was not sure which one will suit my need.
  2. Thought why don’t I first get the exact issue in the log file.  Went through the Log file in SP_ROOT\Logs folder, but it didn’t help.
  3. Got an idea of trying verbose logging for Excel Services.  SharePoint 2010 Central Administration -> Monitoring section -> (Reporting Section) Configure diagnostic logging . Selected Excel Services Application and changed the two drop-down values to verbose.
  4. Performed the action of save/publish from Excel again to repeat the error with additional logs.
  5. This time I managed to get the below error message in the Log File: Error initializing Safe control – Assembly:Microsoft.Office.SharePoint.ClientExtensions
  6. This error is well documented on this Microsoft KB983007. You will get a hint here that this is due to security issue with your Managed Accounts setup. Meanwhile, do not forget to revert back the verbose logging settings that you performed in earlier Step 3.
  7. My next task was to find out the Managed Account which is responsible for Excel Services.  To to this, I went back to Central Administration -> Security section -> Configure managed accounts option.
  8. Clicked on Edit option against each account and reviewed the farm components using this account. I found that WROX\sp_serviceapp account was using Excel Services Application.
    Identify managed account which is using SharePoint Services
  9. My next task was to review the security settings of sp_serviceapp user in SQL Server.
  10. I launched SQL Server Management Studio and connected to the default instance which is used by SharePoint.
    Review SQL Server Logins
  11. Reviewed its permission as shown below:
    SQL Server Login Properties
  12. Noticed that this account didn’t had permission to WSS_Content_3000 and WSS_Content_Team databases, which were the actual Content Databases used by the Web Applications on which I was trying the Excel save/publish operation.
  13. Went ahead and assigned db_owner and public roles for both these databases for the user sp_serviceapp.
    SQL Server login - gave permission to SharePoint managed account
  14. Save the above changes by click OK button. (No reboot / iisreset is required)
  15. Tried the Excel save/publish operation once again and it worked now!  Below is the expected result:
    Published Excel Sheet

I hope that some of the above steps that I shared above will help you to resolve similar errors in your environment.

 


Jan 24 2012

Excel shows Formula’s instead of Values

Category: Excel,Microsoft,TechnologyKamlesh @ 11:28 pm

I have been using Laptop since few months and most of the time I get into trouble by pressing wrong combination of keys.  I am an expert PC keyboard user, but I am still not that fast on a Laptop keyboard.  Today, while updating my Project Status Report in Microsoft Excel 2010, I pressed a secret combination of keys which showed me the below screen:

Excel shows Formula instead of Values

For a moment, I got shocked! Microsoft Excel showed Formula’s instead of the values.  The Date column (Column B) showed me the internal numeric values too. I realized that I must have pressed a combination of reserved keys in Excel.  I could resolve this by pressing CTRL+` key.  Please note that in most of the keyboards, the ` key is located left to the numeric 1 (and below Escape key). As an alternate for Mouse users, you can even use the Office ribbon (Formula’s tab) to access the same option:

Excel 2010 Show Formula's toolbar

For the Keyboard Users, please refer to the complete list of Excel 2010 keyboard shortcuts on the Microsoft website.

 


Dec 26 2009

Excel 2010 Beta – File Save Bug

Category: Excel,MicrosoftKamlesh @ 1:46 pm

Today, while saving a New Excel Worksheet in Microsoft Excel 2010 Beta, I received the following message:

Unable to save file under a directory with special characters

I was trying to save this file under folder “C:\MyWebsite[Dev]“, which contained special characters “[]“.

To further confirm the bug, I tried to create a New Excel Worksheet from Windows Explorer (using Right Click -> New -> Microsoft Excel Worksheet). Using this method, the file got created successfully. I could even open it (double click), modify it and save it in Excel 2010.

This problem is only appearing while creating a New file in Excel. I have not seen the same behavior in Word 2010.

Does anyone know if this is a real bug or a default behavior of Excel 2010?

Update on 28-Dec-2009:
Further analysis revealed that this issue persists in Excel 2003 too.  Below is the screen shot from Excel 2003 (SP3).

Anyone know the reason behind this design?