none
Excel 2013 and Exception from HRESULT: 0x800A01A8

    Question

  • Hello,

    I use a shared Excel Addin written in C#

    using Excel = Microsoft.Office.Interop.Excel;
    using Office = Microsoft.Office.Core;
      
    [ComVisible(true)]
    [GuidAttribute("12B22828-5CDD-4AED-B888-4AE8B84ED7B3"), ProgId("Jedox.Palo.XlAddin.Connect")]
    public class Connect : Extensibility.IDTExtensibility2, System.IDisposable
    {
    	private static Office.CommandBar myBar;
    	Microsoft.Office.Core.CommandBarButton myButton
    	// other variables
    
            public void OnStartupComplete(ref Array custom)
            {
    		// ...
                    Office.CommandBars oCommandBars = (Office.CommandBars)ExcelHelper.oExcelApp.GetType().InvokeMember(
    							"CommandBars", 
    							BindingFlags.GetProperty, 
    							null, 
    							ExcelHelper.oExcelApp, 
    							null, 
    							System.Globalization.CultureInfo.InvariantCulture);
    
    		myBar = oCommandBars.Add(
    			Name: Office.MsoControlType.msoControlPopup, 
    			Temporary: true);
    
    		myBar.Name = "myBar Name";
    
    	        myButton = (Microsoft.Office.Core.CommandBarButton)myBar.Controls.Add(
    				Type: Office.MsoControlType.msoControlButton, 
    				Temporary: true);
    
    		myButton.Caption = "myButton Caption";
                    myButton.OnAction = "!<Connect>";
                    myButton.FaceId = mItemPasteView.= 457;
    
    		// ...
    	}
    
            public void OnBeginShutdown(ref System.Array custom)
            {
    		// ...
    		if (myBar.Position == Office.MsoBarPosition.msoBarBottom)
                    {
    		// ...;
                    }
    		// ...
    	}
    
    	// other methods
    }
    

    After starting Excel 2013 with disabled start screen I open a stored Excel file which has just the formula =Upper2("aha") in Sheet1!A1.

    When I now close Excel I get

    System.Runtime.InteropServices.COMException (0x800A01A8): Exception from HRESULT: 0x800A01A8
       at Microsoft.Office.Core.CommandBar.get_Position()

    at the line

      if (olapBar.Position == Office.MsoBarPosition.msoBarBottom)

    in method  OnBeginShutdown

    I looks like the stored reference become invalid ( it is != null).

    This problem doesn't occur with Excel 2010 or older.

    The problem also does not occur with enabled 2013 start screen.

    What can I do ?

    TIA

       Hendrik Schmieder

    Monday, March 04, 2013 1:49 PM

All replies

  • Hi Hendrik,

    Thank you for posting in the MSDN Forum.

    I'll consult your issue with my colleague. You'll be informed if there's any update.

    Thank you for your patience and understanding.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, March 05, 2013 12:19 PM
    Moderator
  • Hello Hendrik,

    I tried to reproduce the issue using the code that you mentioned here. However, I am not getting the exception.

    Could you please share a sample project so that I can test and confirm if the issue occurs.

    Thanks,

    Sreerenj G Nair

    Wednesday, March 13, 2013 10:32 PM
    Answerer
  • I see a lot of people having this problem, but no one finding/reporting a resolution.  It's occurring for me since upgrading to Win8.1 and Office2013 32-bit a month or so ago.  We are running PeopleSoft at my school.  The problem fires up when I run a PeopleSoft Query, then download the result to Excel.  If I run a 2nd (or any # of additional) query and download that result to Excel, it fires this error.  It never fires on the opening of only 1 Excel file.

    I tried closing all and running an Office repair.  I opened 2 Excel files that already existed and the error did not occur.  As soon as I tried downloading one from PeopleSoft while another sheet was already open, it fired up the error.  After that, opening *any* additional Excel file fired the error.  And it takes clicking OK something like 6 times to make the error message close.  The it usually also fires a new error message saying, "Exception has been thrown by the target of an invocation."

    It not only fires the error when opening an additional Excel file, but also when just switching between 2 (or more) Excel files that are already open.

    It's really becoming annoying and it cuts into productivity when several Excel files are open.  A resolution would be much appreciated!!

    Thursday, August 06, 2015 7:58 PM
  • @Mrlizbet

    I'm not sure that you're problem is the same as mine.

    HRESULT: 0x800A01A8 is a very common error.

    Friday, August 07, 2015 2:43 PM
  • No answers to this yet?  I am having the exact same issue with excel that is downloaded from PeopleSoft.  I am on Windows Professional 7, but Office 2013.  I just started having this problem, have been able to download from PeopleSoft into Office 2013 without a problem a few months ago, and it just began.  I'm wondering if perhaps an update is what changed the way this is working.  Annoying definitely!!!!
    Friday, August 14, 2015 10:18 PM
  • I ran the Microsoft Office Configuration Analyzer, and the codes that were coming up had to do with the Bluetooth Add-In. 

    "The Bluetooth add-in (BtOfficeAddin.BtOfficeIntegration.1) is enabled in the registry"

    I followed the instructions to disable it in the registry.  I've since downloaded multiple queries from PeopleSoft and no more issues!

    • Proposed as answer by MariaVartist Friday, August 14, 2015 11:36 PM
    • Unproposed as answer by h_schmieder Monday, August 17, 2015 9:20 AM
    Friday, August 14, 2015 11:36 PM
  • @MariaVartist:

    Don't hijack my thread !

    Open your own thread !!

    Monday, August 17, 2015 9:21 AM