none
Cannot load Excel.Application object RRS feed

  • Question

  • Hi,

    I have a legitimate copy of Excel 2013 on Windows 8.1, but cannot run a VBscript that works perfectly elsewhere.

    Although I'm not using Visual Studio, I temporarily loaded Visual Studio Community Edition, and confirmed that the Excel 15.0 Object Library is available.

    I also checked the Registry, and there's only one Microsoft Office registered.

    The error is:


    Could not locate automation class named "Excel.Application".  Code: 80020009, Source: WScript.CreateObject

    System:  The storage control block address is invalid.


    Friday, December 4, 2015 2:33 PM

Answers

  • Hi,

    The code above is correct, it seems that the Excel application is broken. I suggest that you repair or re-install the Excel to see whether the issue was fixed.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, December 7, 2015 2:15 AM
    Moderator
  • Hi,

    Please feel free to let us know if you still have the problem with this issue.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, December 8, 2015 9:09 AM
    Moderator

All replies

  • What line of code exactly fires the exception?

    Where and when do you try to create an Excel instance?

    Take a look at the How to automate Microsoft Excel from Visual Basic article which explains all the required steps for automating Excel from VB.

    Friday, December 4, 2015 4:34 PM
  • Thanks Eugene for trying to help, but I'm very familiar with automating Office Applications from VB or VBScript.

    The error is happening when the Excel object is created,

    Set o_Excel = WScript.CreateObject("Excel.Application")

    or

    Set o_Excel = WScript.CreateObject("excel.application")



    Friday, December 4, 2015 5:12 PM
  • Update on this -


    Still no luck.  I tried registering Excel.exe (which doesn't make any sense, but I read it on the web) with regsvr32, and received an invalid DLL or OCX file.

    I also registered MSCOMCTL.OCX successfully, but still cannot create the Excel.Application object.


    Sunday, December 6, 2015 5:29 PM
  • Hi,

    The code above is correct, it seems that the Excel application is broken. I suggest that you repair or re-install the Excel to see whether the issue was fixed.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, December 7, 2015 2:15 AM
    Moderator
  • I was hoping nobody would recommend that.  I always get nervous that my product key won't work, if it's uninstalled then re-installed.

    Anyway, note that it's only in VBScript that CreateObject( "excel.application" ) doesn't work.  Inside an Excel Macro, it works fine, it returns a legitimate object.

    I'll try re-installing, over the weekend, thanks.

    Monday, December 7, 2015 4:54 PM
  • Hi,

    Please feel free to let us know if you still have the problem with this issue.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, December 8, 2015 9:09 AM
    Moderator
  • Yep, re-installing did the trick, thanks.

    Friday, December 11, 2015 8:57 PM