"Type mismatch" exception in Excel.Application.Version

188 views
Skip to first unread message

Andrei F

unread,
Jan 10, 2018, 5:14:18 PM1/10/18
to Excel-DNA
> System.Runtime.InteropServices.COMException (0x80020005): Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))
>   at Microsoft.Office.Interop.Excel._Application.get_Version()

Does anyone know why this exception can be happening?

Govert van Drimmelen

unread,
Jan 11, 2018, 2:48:25 AM1/11/18
to exce...@googlegroups.com
Hi Andrei,

Can you say a bit more about the context - is this from inside the Excel-DNA code or your own add-in?
Are you making the call through the interop assembly?
Are you able to make the call late-bound instead, as a test?

The result of Application.Version is a string - is that what you're expecting?

-Govert


From: exce...@googlegroups.com [exce...@googlegroups.com] on behalf of Andrei F [fandre...@gmail.com]
Sent: 11 January 2018 12:14 AM
To: Excel-DNA
Subject: [ExcelDna] "Type mismatch" exception in Excel.Application.Version

> System.Runtime.InteropServices.COMException (0x80020005): Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))
>   at Microsoft.Office.Interop.Excel._Application.get_Version()

Does anyone know why this exception can be happening?

--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at https://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages