ExcelDNA Intellisense not working

978 views
Skip to first unread message

Gerben

unread,
Feb 24, 2018, 10:25:07 AM2/24/18
to Excel-DNA
I have added the dll to my Visual Studio solution

using ExcelDna.Integration;

using ExcelDna.Integration.CustomUI;

using ExcelDna.IntelliSense;


And added comments to the function:


But it does not work in Excel:


Anybody knows an answer to this problem:


[ExcelFunction(Description = "Joins a string to a number", Category = "ExcelDnaFunctions")]


public static string JoinThemExcelDNA([ExcelArgument("string for name")]string str, [ExcelArgument("double for number")] double val)




{



return str + val;




}


Govert van Drimmelen

unread,
Feb 24, 2018, 10:53:48 AM2/24/18
to exce...@googlegroups.com
Hi Gerben,

Are you initializing the IntelliSenseServer in your add-in?

    using ExcelDna.Integration;
    using ExcelDna.IntelliSense;
    public class AddIn : IExcelAddIn
    {
        public void AutoOpen()
        {
            IntelliSenseServer.Register();
        }

        public void AutoClose()
        {
        }
    }


-Govert


From: exce...@googlegroups.com [exce...@googlegroups.com] on behalf of Gerben [62g...@gmail.com]
Sent: 24 February 2018 05:25 PM
To: Excel-DNA
Subject: [ExcelDna] ExcelDNA Intellisense not working

--
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.

Nasrul Arif

unread,
Apr 23, 2019, 10:51:31 PM4/23/19
to Excel-DNA
Hello Govert,

I might need a bit of help. I couldn't find VB code for initializing IntelliSenseServer. The one you showed here and in your "Usage Instruction" are all in C#.

Can you provide me VB version of the initializing code?

Its been a while since I use this language, I tried to convert your C# code but failed.

Thank you.

Govert van Drimmelen

unread,
Apr 24, 2019, 6:09:59 AM4/24/19
to exce...@googlegroups.com

Easiest is to just download the pre-compiled IntelliSense add-in from here:

https://github.com/Excel-DNA/IntelliSense/releases

 

Pick either ExcelDna.IntelliSense.xll or ExcelDna.IntelliSense64.xll depending on your Excel version, and File->Open to load it.

Everything should then work without any changes to your add-in.

 

If that doesn’t work, you can contact me directly to arrange for a support session too.

 

-Govert

--

Nasrul Arif

unread,
Apr 24, 2019, 9:43:05 PM4/24/19
to Excel-DNA
Wow, thank you. It works well.

I downloaded, put in a folder and then two ways to use it:

1. Open Excel > File > Open > Browse for ExcelDna.IntelliSense64.xll and Open

or

2. Add this code to add-in (in VB), specifically using VSTO, this code should be within the "ThisAddIn_Startup" Sub in "ThisAddIn.vb" file

Application.RegisterXLL("<YOUR PATH>\ExcelDna.IntelliSense64.xll")

Either way will work, but for me, my add-in was meant to be deployed to client, so the best way is to load internally using the code.

Again, thank you so much Govert. Very helpful.

Nasrul Arif

unread,
Apr 24, 2019, 10:30:36 PM4/24/19
to Excel-DNA
But unfortunately I faced some issue with it. After few minutes of running the Add-In in debug mode, this happens in my Visual Studio.

Managed Debugging Assistant 'LoaderLock' : 'Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.'

and my Excel is not responding anymore.

I searched for some solution in the internet but I still couldn't figure out what is the side-effect. Do this just happens in debug mode or what

Govert van Drimmelen

unread,
Apr 25, 2019, 3:26:36 AM4/25/19
to exce...@googlegroups.com

The Visual Studio warning about the “LoaderLock” is expected, and you can just disable that in Visual Studio when debugging your add-in (the dialog that pops up should have a checkbox that enables you to do this).

 

The IntelliSense uses a dangerous mechanism to detect that add-ins are loaded and unloaded, but tried to be careful when implementing it and have not heard of any trouble from this.

 

-Govert

 

 

From: exce...@googlegroups.com <exce...@googlegroups.com> On Behalf Of Nasrul Arif
Sent: 25 April 2019 04:31
To: Excel-DNA <exce...@googlegroups.com>
Subject: Re: [ExcelDna] ExcelDNA Intellisense not working

 

But unfortunately I faced some issue with it. After few minutes of running the Add-In in debug mode, this happens in my Visual Studio.

--

Peter Carter

unread,
Apr 25, 2019, 6:55:58 AM4/25/19
to exce...@googlegroups.com
We had problems with stability of our addin when  using intellisense when running under the debugger (n.b. not a problem with the debug build itself). We settled for only loading the intellisense server when the debugger wasn't attached at startup. You can test this with a call to System.Diagnostics.Debugger.IsAttached.



From: Govert van Drimmelen <gov...@icon.co.za>
Sent: Thursday, 25 April 2019 08:25
To: exce...@googlegroups.com
Subject: RE: [ExcelDna] ExcelDNA Intellisense not working
Reply all
Reply to author
Forward
0 new messages