Excel AddIn starts to load, but not gets loaded. Not in the disabled addins

83 views
Skip to first unread message

Jeevan Nayal

unread,
Mar 4, 2021, 2:07:33 PM3/4/21
to Excel-DNA
Hi,
I am using excel dna 0.34.6.
I have excel addin code that uses excel dna. Same code in 2 different git branches. 
One of them loads correctly and addin gets loaded.
In other branch addin starts to load, but after 2 seconds not gets loaded. It is also not in disabled addins.

The difference I found between 2 projects is that, working code does not generate .xll.config file , but not working one generates .xll config file.
What can be the issue? Can it be someting related to packaging of excel dna? 
Please help, I am clueless.

Thanks and Regards,
Jeevan, India

Govert van Drimmelen

unread,
Mar 4, 2021, 3:27:48 PM3/4/21
to exce...@googlegroups.com

Hi Jeevan,

 

For the add-in that does not load, does it contain UDF functions that you can check?

Sometimes the UDF functions load, but the ribbon might not, due to an error in the ribbon XML.

In this case the UDF functions will still be present. There is a setting in Excel to show add-in UI errors, which can help debug this.

 

Next you might want to see what happens if you remove or clear the .config file. Does that make any difference?

 

Then you can attach a debugger to Excel before loading the problem add-in and look for possible errors in the output window.

 

If you’re still stuck, you can also contact me directly to book an support session, and we can have a look together.

 

-Govert

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/d4e1ca39-eb14-4d61-b5e0-269affbde080n%40googlegroups.com.

Jeevan Nayal

unread,
Mar 5, 2021, 4:54:15 AM3/5/21
to Excel-DNA
No, UDF functions don't load. There are no UI interface errors.
On clearing and deleting .config files, it again creates them on re build.

Kedar Kulkarni

unread,
Mar 5, 2021, 9:24:16 PM3/5/21
to Excel-DNA
Hi Jeevan,

When you say the addin does not load, how do you know it is not loaded? I usually try following - maybe that helps.
1. In the ribbon module - OnConnection or in GetCustomUI or constructor of ribbon, add a messagebox. (or use AutoOpen - https://stackoverflow.com/questions/11233719/any-events-supported-in-exceldna)
2. Use a debug build and try loading addin. On showing the messagebox try attaching debugger.
3. Enable 'All' exceptions in Exception settings. 

Make sure you have logging started in ribbon constructor so that way you have logged any errors. I could also suggest using AppDomain.CurrentDomain.UnhandledException to catch any exceptions.

Usually, the ribbon constructor or exceladdin constructor code should be the first to get executed. An addin won't unload itself automatically so there must be some runtime error that would cause this.

thanks
Kedar
Reply all
Reply to author
Forward
0 new messages