2
Vote

Application.GetActiveInstance throws ArgumentException "component"

description

From stack trace:
"System.ArgumentException was caught
HResult=-2147024809
Message=component
Source=System
StackTrace:
   at System.ComponentModel.TypeDescriptor.GetDescriptor(Object component, Boolean noCustomTypeDesc)
   at System.ComponentModel.TypeDescriptor.GetClassName(Object component)
   at NetOffice.RunningObjectTable.GetActiveProxyFromROT(String componentName, String className, Boolean throwOnError)
   at NetOffice.ExcelApi.Application.GetActiveInstance()
   at ITSR2.Bricks.Excel.ExcelApp.GetRunningInstance()
InnerException: "
Do you have an ideas about possible reason and how to solve it?

file attachments

comments

ControlBreak wrote Jan 6, 2014 at 1:43 PM

I am experiencing the same issue on some code that used to work in the past.I suspect that some Office updates (?) occured and changes some things.

Riffer wrote Feb 5, 2015 at 3:10 PM

I have the same problem with a system running Windows 7 64bit- the admin just recently uninstalled a 32bit version of MS Office 2010 and installed a 64bit edition of MS Office 2010. My application manipulates Excel Sheets using NetOffice from an external application not an addon.

While Excel is running in RAM all goes right (including all functionalities) but when it is not running actually I get the exact same exception as in this issue mentioned.

My best guess is to just ignore this specific exception but I would like to have this solved in a more valid way.

SebastianDotNet wrote Feb 5, 2015 at 5:43 PM

hey Riffer

which NO version ???

i have changed the implementation in NO 1.7.2 specialy for MS-Excel.NO 1.7.2 doesnt use the Running Object Table for Excel in GetActiveInstance(s)please make sure to use the latest NO version.

*Sebastian

Riffer wrote Feb 10, 2015 at 12:41 PM

Sorry for my late response. Problem occuring in with NO 1.6. Will upgrade to newest version as adviced.

Thank you for your reply!

gborrego wrote Apr 10 at 4:05 PM

Hello! I am using version 1.7.3 and I am getting the same error, but not on the first attempt, that is to say,
from the second attempt and forward. I am trying to get the body text from the current email message on the keyup event (caught by a keyboard hook). I observed that this error is not thrown when I use NetOffice out of the scope of the keyboard hook.

Any ideas?