none
Intermittent Error: Exception from HRESTULT: 0x800A03EC RRS feed

  • Question

  • The error details are below.  This occurs while refreshing connections via a macro, but not every time.  The "send a frown" button does not work, so my only option is to copy details or click OK. I'm using Excel 2016 from Office 365. Let me know if you need any other version info, or any ideas on what this error means.

    And the error being generated is this:

    Exception from HRESULT: 0x800A03EC
    
    Stack Trace:
    
    Microsoft.Mashup.Client.Excel.Shim.NativeExcelException: Exception from HRESULT: 0x800A03EC ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC
       --- End of inner exception stack trace ---
       at Microsoft.Mashup.Client.Excel.NativeExcelFunctions.ValidateResult(Int32 result, Int32[] expectedValues)
       at Microsoft.Mashup.Client.Excel.Shim.NativeFillServices.PerformPostRefreshFixups(IWorkbook workbook, IListObject listObject, FillColumnType[] columnTypes, FillColumnType[] previousColumnTypes, FillColumnType[] recordFieldTypes, Boolean removeBlankColumns, Boolean applyResultStyle)
       at Microsoft.Mashup.Client.Excel.FillManager.RefreshFillSession.CompleteRefresh(IWorkbook workbook, Boolean onTimer)
       at Microsoft.Mashup.Client.Excel.FillManager.RefreshFillSession.UpdateRefreshStatus(IWorkbook workbook, Boolean onTimer)
       at Microsoft.Mashup.Client.Excel.FillManager.RefreshFillSession.ResumeFill(Boolean onTimer)
       at Microsoft.Mashup.Client.Excel.FillManager.UpdateQueries()
       at Microsoft.Mashup.Client.Excel.FillManager.<onfillupdatetimertick>b__5()
       at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
    
    Invocation Stack Trace:
    
       at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
       at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.HandleException(Exception e)
       at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
       at System.Windows.Forms.Timer.OnTick(EventArgs e)
       at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    </onfillupdatetimertick>

    Shawn Keene

    Tuesday, March 8, 2016 2:46 PM

Answers

  • Here is a snippet of suggested code that is a workaround to solve your problem (it is kind of a "sleep" but does not block Excel from async operation to complete their work):

    Sub RefreshEmAndClose()

        For Each cn In Application.Workbooks("<your workbook name>").Connections

         lTest = InStr(1, cn.OLEDBConnection.Connection, "provider=Microsoft.Mashup.OleDb.1")

         If Err.Number <> 0 Then

             Err.Clear

             Exit For

         End If

         If lTest > 0 Then cn.Refresh

         Next cn

         Application.OnTime DateAdd("s", 10, Now), "NextWorkToDo"   

    End Sub

    Sub NextWorkToDo()

         //Here insert your VBA code that is supposed to run after refresh

    End Sub


    Regarding the send smile/frown, we are still checking this. Thank you!

    Monday, March 14, 2016 9:48 AM
  • Thanks for reporting this, Shawn. I've filed a bug and we'll look into it.

    Ehren

    Tuesday, March 8, 2016 8:53 PM
    Owner

All replies

  • Thanks for reporting this, Shawn. I've filed a bug and we'll look into it.

    Ehren

    Tuesday, March 8, 2016 8:53 PM
    Owner
  • Thanks Ehren.  Do you know if the "send a frown" is known to be non-operational in Excel 2016?  Also, is there any way to update the "built in" version of PowerQuery in Excel 2016, or is it pretty much locked in as-is?  If there's any info about how I could work around this error please let me know.


    Shawn Keene

    Wednesday, March 9, 2016 3:50 PM
  • Hm. "Send a Frown" in Excel 2016 should integrate with the Office feedback mechanism (rather than the email-based approach the PQ addin uses in earlier Excel versions). Can you elaborate on what you mean by "non-operational"?

    The only way to update the version of PQ included in Excel 2016 is via the updates shipped by the Office team.

    Ehren

    Wednesday, March 9, 2016 7:36 PM
    Owner
  • The button lets me click it (it shows the hover color and 'presses down' when I click it), but nothing happens.

    Also if you are in the Query Editor and there is the smile icon at the top-left, clicking "Send a smile" or frown from that menu doesn't work either.

    Example:

    Example of the feedback links non-operational


    Shawn Keene


    • Edited by Shawn 'Cmdr' KeeneMVP Wednesday, March 9, 2016 7:43 PM added 'click to enlarge' ability on image
    Wednesday, March 9, 2016 7:42 PM
  • I would like to check the "Send a Smile/Frown" issue you raised.

    What Excel version do you use?

    (you should right click on the Excel.exe file and see the version in the details tab.

    Thursday, March 10, 2016 7:42 AM
  • Excel 2016 MSO (16.0.6001.1061) 64-bit
    Part of Microsoft Office 365 ProPlus

    Shawn Keene

    Thursday, March 10, 2016 4:17 PM
  • Just curious, do you have an Outlook set up (that's logged in with a mail address) on your windows?
    Thursday, March 10, 2016 7:05 PM
    Moderator
  • Yes I do.  Same install of Office 365 of course, with an account for my company Office 365 email account (set as default, the only account).

    Shawn Keene

    Friday, March 11, 2016 6:23 PM
  • Regarding the Exception you receive - we are familiar with this bug and working to solve it. The issue is that VBA refresh returns/completes however there is still additional operations that happen asynchronously right after. This operation collides with the next VBA code line you probably have after the Refresh call. So a workaround would be to have some "Sleep" after the VBA refresh call to allow those additional operations to complete. We are working to solve it in a way that those operations will be part of the refresh.

    Regarding - Send a smile/frown, I couldn't repro it on the RTM and latest C2R build. Would you be able to update your version to latest and reply back if this still happens?

    Sunday, March 13, 2016 12:51 PM
  • Roger that, thanks for looking into it. I've been trying various methods of "sleeping" to get it to wait but so far it's not been 100% successful. A few methods I've tried are below.

    For the send-a-smile, I mistakenly thought I was already on the latest version. I just hit the update option on the Account tab in backstage view, looks like it's updating now. I'll post back results.

    Sub OldPause(secs)
        Dim time1, time2
        time1 = Now
        time2 = Now + TimeValue("0:00:" & secs)
        
        Do Until time1 >= time2
            'DoEvents		'I've tried with or without "DoEvents" in there
            Worksheets("Summary").Range("L16").Value = time2 - time1    'Print remaining seconds in Status box
            time1 = Now()
        Loop
    
    End Sub
    
    Sub Refresh_All_Data_Connections()
        ActiveWorkbook.RefreshAll
        Application.CalculateUntilAsyncQueriesDone	'This seems to have helped the most
    End Sub
    
    Sub NewPause()	'another method of pausing that seems better than old pause
        Do While Application.CalculationState <> xlDone
            Worksheets("Summary").Range("J16").Value = Now()
        Loop
    End Sub
    

    Shawn Keene

    Sunday, March 13, 2016 2:21 PM
  • Updated and now it reflects version 1068 in Excel (and checking for updates doesn't find any now).  However the send-smile still doesn't work.

    Shawn Keene

    Sunday, March 13, 2016 3:26 PM
  • Here is a snippet of suggested code that is a workaround to solve your problem (it is kind of a "sleep" but does not block Excel from async operation to complete their work):

    Sub RefreshEmAndClose()

        For Each cn In Application.Workbooks("<your workbook name>").Connections

         lTest = InStr(1, cn.OLEDBConnection.Connection, "provider=Microsoft.Mashup.OleDb.1")

         If Err.Number <> 0 Then

             Err.Clear

             Exit For

         End If

         If lTest > 0 Then cn.Refresh

         Next cn

         Application.OnTime DateAdd("s", 10, Now), "NextWorkToDo"   

    End Sub

    Sub NextWorkToDo()

         //Here insert your VBA code that is supposed to run after refresh

    End Sub


    Regarding the send smile/frown, we are still checking this. Thank you!

    Monday, March 14, 2016 9:48 AM
  • Have you considered the Application.Wait method? E.g. wait 5 seconds:

    Application.Wait (Now + TimeValue("0:00:05"))

    Monday, March 14, 2016 3:32 PM
  • Application.Wait is not a good solution as it is blocking the polling that updates the status
    Tuesday, March 15, 2016 9:21 AM
  • Thanks for the code snippet, I'm giving it a try but it seems it doesn't detect my connections.  The string comparison never finds "provider=Microsoft.Mashup.OleDb.1", but it's in the connection string.


    Shawn Keene

    Tuesday, March 15, 2016 1:55 PM
  • Nevermind, fixed with modification:

    lTest = InStr(1, cn.OLEDBConnection.Connection, "Provider=Microsoft.Mashup.OleDb.1")

    Added ".connection" and capitalized P because appears it's case-sensitive in the comparison.


    Shawn Keene

    Tuesday, March 15, 2016 1:58 PM
  • Regarding "Send Smile/Frown", can you please check and let me know if it doesn't work from the main Excel window too? What browsers do you have on this machine? (IE9?)

    Wednesday, March 16, 2016 7:31 AM
  • I've got Chrome (Default) and IE11.

    I don't see a place to reach the smile/frown from the main Excel window. 


    Shawn Keene

    Wednesday, March 16, 2016 2:02 PM
  • It turns out that in some combinations of Office 16 version and OS Send-A-Smile doesn’t exist. 

    However, there is the Windows Feedback app available where you can file feedback through. You can access it through: File->Feedback. 

    Can you please send me the OS version you have? (your already posted Excel version to be: Excel 2016 MSO (16.0.6001.1061))

    [Anyways, in those cases you shouldn't been seeing the icon in the Query Editor window... that is a bug...]

    Tuesday, March 22, 2016 1:01 PM
  • This is Windows 7 Pro here.

    I noticed that my coworker using Excel 2013 + Power Query add-in, his files when opened on my PC (Excel 2016) show a warning that they were created with a newer version of PowerQuery.  Is it acceptable that the add-in is newer than the built-in version and can I reasonably expect the 2016 client to get mostly the same updates/fixes as the stand-alone query plugin?


    Shawn Keene

    Tuesday, March 22, 2016 1:29 PM
  • In general all PowerQuery updates/fixes that go to the add-in also go into Office 2016. There can however be some gap in the date you receive it as a result of different "release trains" for each. If you are on the latest C2R version or PU (for MSI) you should be getting all PowerQuery features.

    However if you are part of an enterprise and your IT is "freezing" the Office version released internally to organization than you can experience a gap.

    Tuesday, March 22, 2016 3:21 PM
  • Regarding the send smile/frown issue - apparently it is not exposed to external customers and therefore should not appear in the Query Editor. We will fix this bug. Thank you!
    Tuesday, April 5, 2016 10:16 AM
  • Shawn,

    Is the refresh working properly with the Application.OnTime added?

    Wednesday, August 31, 2016 10:30 PM
  • Hey Jeff,

    It is indeed.  Basically my macro starts the refresh, uses the OnTime function to schedule the next function (macro sub) to run 2 minutes later.  My refresh usually takes only about 10-20 seconds but I gave it 2 minutes for some padding, but it finishes refreshing well and then 2 minutes later it does the rest of the gym (filter some pivots, create and send an email, copy some charts to a network share, save and close the file).


    Shawn Keene

    Wednesday, August 31, 2016 11:49 PM
  • Just confirming in the thread that Penina's suggestion here is working very well.

    Shawn Keene

    Wednesday, August 31, 2016 11:52 PM
  • Thanks!!
    Thursday, September 1, 2016 12:07 AM
  • Morning guys

    Do we know if there is anything nearing solution. I have the self-same issue having been upgraded to Office Pro-Plus (O365) recently. I have a suite of VBA automated reports that connect to SQL using PQ and randomly it seems they throw this exception.

    If something is around the corner, I'd rather not add the sleep code to all the refreshes as it's quite a few!

    Does the 'normal' Office 2016 sku display this behaviour? I have the same 'Send a frown' issue too. The PQ team used to be REALLY responsive on these.

    Please advise. (even if it's all nos!)

    Thanks


    • Edited by Nick Hodge Thursday, December 8, 2016 7:05 AM
    Thursday, December 8, 2016 6:53 AM
  • This bug is seriously preventing my firm from adopting Office 2016 as a platform please reply and let us know the status on this bug it is annoying.

    • Proposed as answer by Norway John Thursday, December 22, 2016 11:48 AM
    • Unproposed as answer by Norway John Thursday, December 22, 2016 11:48 AM
    Friday, December 16, 2016 6:17 PM
  • Thank you for reporting this issue to us.

    We are aware of the issue and are planning to address it going forward.

    There is no specific due date for the fix yet. I’ll keep you updated on this thread once we release the fix for this problem.

    Thanks

    Natan

    Excel Team 


    Tuesday, December 20, 2016 2:03 PM
  • I am having the exact same issue. In a workbook with three queries to an Oracle database, refresh works fine when opening the Excel workbook manually and clicking on the "Refresh All" button. However, when the same workbook is opened via a VBA macro that subsequently refreshes the queries, most of the time I end up with the exact same error message as explained initially in this thread. I have tried several work-arounds with no result. Since we are about to make a technology choice for a major rewrite of a complex reporting system involving dozens of Excel workbooks, we are quite eager to see this showstopper being addressed promptly. This is my code where the problem occurs:

    For Each objConnection In ActiveWorkbook.Connections

            'Refresh this connection
                    objConnection.Refresh
                    DoEvents
                    MsgBox "Refresh completed for " & objConnection        
             Next

    Thursday, December 22, 2016 12:40 PM
  •  I do not know if this additional information is of any help, but want to share it anyway: I just unchecked the "Fast Data Load" option in the Query Properties screen for each of the queries in the workbook, and re-ran my VBS script. The Exception from HRESULT error is now gone! I have since re-run the script on several sets of files, with the same positive result. Unfortunately, I am not able to reproduce the initial error by re-checking the "Fast Data Load" option, so I am now a bit confused as to why the error suddenly disappeared.
    Thursday, December 22, 2016 1:47 PM
  • It is still a problem. How is this not fixed almost one year later? I am running Excel 2016 with power queries galore. I am tasked with automating a refresh on 10 queries for an Engineering team for yield analysis. It throws this error every refresh.

    Seems 2013 is the best option to use rather than deal with the 2016 mess.

    Monday, October 23, 2017 2:10 PM
  • I'm having similar behaviour and the same error message when trying to update a pivot table that's linked to a MySQL database through ODBC connector (v5.3.6 specifically)

    Excel randomly throws an error sometimes, and then dumps out entirely.

    Friday, December 22, 2017 11:37 AM
  • Any updates on this error?

    I received this while trying to refresh a PowerQuery with VBA using ActiveWorkbook.RefreshAll 

    Any insight would be much appreciated!

    *****************


    Error Message:
    Exception from HRESULT: 0x800A03EC

    Stack Trace:
       at Microsoft.Mashup.Client.Excel.NativeExcelFunctionsBase.ValidateResult(Int32 result, Int32[] expectedValues)
       at Microsoft.Mashup.Client.Excel.Shim.NativeFillServices.PerformPostRefreshFixups(IWorkbook workbook, IListObject listObject, String[] columnNames, FillColumnType[] columnTypes, String[] previousColumnNames, FillColumnType[] previousColumnTypes, FillColumnType[] recordFieldTypes, Boolean removeBlankColumns, Boolean applyResultStyle)
       at Microsoft.Mashup.Client.Excel.Fill.PollingRefreshFillSession.CompleteRefresh(IWorkbook workbook, Boolean onTimer)
       at Microsoft.Mashup.Client.Excel.Fill.PollingRefreshFillSession.UpdateRefreshStatus(IWorkbook workbook, Boolean onTimer)
       at Microsoft.Mashup.Client.Excel.Fill.PollingRefreshFillSession.ResumeFill(Boolean onTimer)
       at Microsoft.Mashup.Client.Excel.PollingFillManager.<UpdateQueries>b__a(IFillSession fillSession)
       at Microsoft.Mashup.Client.UI.Shared.Model.QueriesUtilities.ForEachWithChangeScope[T](IEnumerable`1 items, Func`2 getQueries, Action`1 action)
       at Microsoft.Mashup.Client.Excel.Fill.FillManager.ForEachFillSessionByWorkbook(Action`1 action)
       at Microsoft.Mashup.Client.Excel.PollingFillManager.<OnFillUpdateTimerTick>b__6()
       at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

    Stack Trace Message:
    Exception from HRESULT: 0x800A03EC

    Invocation Stack Trace:
       at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
       at Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo..ctor(String message, Exception exception, Nullable`1 stackTraceInfo)
       at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
       at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0()
       at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
       at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
       at System.Windows.Forms.Timer.OnTick(EventArgs e)
       at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    Supports Premium Content:
    False

    Formulas:

    Monday, July 29, 2019 1:13 PM