C#,vb.net,MVC,Jquery,javascript,jscript,vbscript,html,vb,sharepoint,COM,WPF,WCF,Wwf,Asp,Asp.net,questions & answers,

Latest in Sports

Showing posts with label Excel. Show all posts
Showing posts with label Excel. Show all posts

Tuesday, October 14, 2014

I am trying to open an excel file from Sharepoint 2010 using Excel 2010. I am getting the following exception:
 
Excel found unreadable content in ‘[filename].xls’. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes.
 
Any idea why I am getting this exception. Do you know the solution?


SOLUTION :

Have you tried below:
 
1. Open the file in Excel 2010
 2. Go to File: Save
3. Change the Save As type to Web Page (.html), save and close the file
4. Open the .html file in Excel
 5. Save the file as a .xlsx (with a new name so the original isn't lost)

Friday, January 24, 2014


Currently I am working on Excel AddIn development using Visual Studio 2012, .Net framework 4.0, VSTO and Excel 2010.

I have developed a custom BackStage view under File menu.

The scenario: I want to navigate user to BackStage screen each time when he opens an excel file. By default, excel opens "Home" tab and "Sheet1" is selected.

I tried using SendKeys("%F") etc. from C# AddIn code, but it does not work consistently.

 

Has anyone came across such situation? If anyone worked on related issue earlier or have some idea how to achieve this, please share it with me.


 

 

Currently I am working on Excel AddIn development using Visual Studio 2012, .Net framework 4.0, VSTO and Excel 2010.

 

I have developed a custom BackStage view under File menu.

The scenario: I want to navigate user to BackStage screen each time when he opens an excel file. By default, excel opens "Home" tab and "Sheet1" is selected.

I tried using SendKeys("%F") etc. from C# AddIn code, but it does not work consistently.

 

Has anyone came across such situation? If anyone worked on related issue earlier or have some idea how to achieve this, please share it with me.


SOLUTION 1:

Use the below code in the Ribbon Load. “TabAddIns” is a control ID which I have in my property, check in your tab property and give the same in the below code.

 

this.RibbonUI.ActivateTabMso("TabAddIns");