none
Getting error message HRESULT: 0x800A03EC RRS feed

  • Question

  • I have created an application that creates an Excel document from a GridView. Every week there is new data in the GridView coming in from a web service.

    I always have a desktop shortcut to the exe-file in the Debug folder.

    I have used this since 2014 with no problem, but now I get the error:

    HRESULT: 0x800A03EC

    And the detailed message complaines about row 1548:

     workbook.SaveAs(outfile1, Type.Missing, Type.Missing, Type.Missing,
                                Type.Missing, Type.Missing, Excel.XlSaveAsAccessMode.xlNoChange,
                                Type.Missing, Type.Missing, Type.Missing, Type.Missing,
                                Type.Missing);

    Whenever I get an error message of some sort I usually try to run the program from within Visual Studio, to get a clearer view of what is going on.

    But, this time when I do that, I don't get the same error message. The Excel is created just fine.

    What could be the problem here? And why does the problem only occurs when running the application outside Visual Studio?

    What I have done prior to running the application today, is that I have tried to put an Excel template (.xltx) inside XLSTART folder, and also tried to set my own start directory. None of this didn't work and the template didn't run. After that I installed an extension to Excel called Kutools. But all this is another story, and I supposed this wouldn't have anything to do with my problem.

    Whenever some problem occurs I thing it also would be the same when running the application inside Visual Studio.



    • Edited by Jonas Andersson Sunday, February 12, 2017 10:22 PM
    • Moved by Bob Ding Monday, February 13, 2017 1:33 AM office develop
    Sunday, February 12, 2017 10:21 PM

Answers

  • The best way to diagnose the issue is to revert back to doing what you have done today as this appears to be the issue. 

    You could also ask your question in the Excel for developer forum.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Sunday, February 12, 2017 11:34 PM

All replies

  • The best way to diagnose the issue is to revert back to doing what you have done today as this appears to be the issue. 

    You could also ask your question in the Excel for developer forum.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Sunday, February 12, 2017 11:34 PM
  • Hi,

    For your case about Office Development, I will move your thread to Excel for Developers for suitable help.

    Your understanding and cooperation will be grateful.

    Best Regards,

    Bob


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 13, 2017 1:41 AM
  • Hi,

    Since you didn't get any exception when debugging in the VS, I suggest you delete all files in debug folder and then rebuild the project and check if the error still exists.

    Besides, I suggest you comment out other lines and test SaveAs method to check if the issue causes from your code.

    If the issue still exists, please try to create a new project and test Open/SaveAs method.

    If the issue causes from your other parts, please share sample code here.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, February 15, 2017 5:50 AM
    Moderator
  • Thanks for your suggestions, and my issue was more suitable in this area of the forum. Didn't know there was the section Excel for Developers.

    OK, I did remove Kutools and made a repair on Excel, and now it works.

    I was using Kutools to open a custom workbook with my favourite cellstyles, and this seems to have causing the trouble.

    I might try to install Kutools again, without doing anything with a custom workbook, and see if the problems comes back.

    I don't think that it was Kutools itself that caused the problem, but perhaps tha settings within. I set it to use another Excel template when open a new workbook. That might have caused the trouble.


    Thursday, February 16, 2017 6:26 PM
  • And by the way. Later on I also got the same error message when running from within Visual Studio, but since I sorted it all out it's no longer a problem.
    Thursday, February 16, 2017 6:31 PM