Forum Discussion

Topbuild's avatar
2 years ago

Export to Excel not working

Hi,

 

Since the latest upgarde to version 20232.1.24.7870, When exporting reports to Excel, nothing happens

I looked up the log and this is the report:

 

2023-03-13 12:12:12.9505,MYOB.Huxley.RF.Core.Services.AppService.RFLogService,Error,1, : System.InvalidCastException: Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000208D5-0000-0000-C000-000000000046}' failed due to the following error: Interface not registered (Exception from HRESULT: 0x80040155).
at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
at Microsoft.Office.Interop.Excel.ApplicationClass.get_Workbooks()
at MYOB.Huxley.RF.Extension.Export.Excel.Formatter.CreateXls(String fileName)

 

This is too technical for me.

Any suggestion to resolve this issue?

Thank you

  • Hi Topbuild

     

    It looks like you're experiencing the Microsoft.Office.Interop.Excel._Application error. Generally this error means that when a program such as AccountRight asks which version of Excel is installed, the wrong version is being reported back, causing a communication problem and errors between the programs.

     

    This can happen when different versions of Office/Excel may have been previously installed on the computer, and components/values are left behind. This type of error can be fixed by one one of the following:

    Please do let us know how you go. 

     

    If my response has answered your enquiry please click "Accept as Solution" to assist other users find this information.