Excel UDF IntelliSense for Excel-DNA and VBA

2,306 views
Skip to first unread message

Govert van Drimmelen

unread,
Jun 18, 2016, 5:14:27 PM6/18/16
to Excel-DNA
The Excel-DNA IntelliSense project is now ready for public testing.
Please have a look!

Excel-DNA IntelliSense provides on-sheet help for UDF functions as they are entered into a cell, similar to the help available for built-in Excel functions.


For Excel-DNA add-ins (v0.32 and later) that already provide descriptions in the [ExcelFunction] and [ExcelArgument] attributes, no extra work is required.
Just open (or install) the ExcelDna.IntelliSense.xll add-in, and everything should work. (There is also a NuGet package with library for embedding the service into your add-in.)

For VBA functions, you can add an extra sheet with the IntelliSense descriptions, or add an external .xml file with the information, or embed as a the CustomXML part in the Workbook or .xlam add-in.
Then open (or install) the ExcelDna.IntelliSense.xll add-in to provide the display service.

Details and downloads are on GitHub:

The Excel-DNA Google group (https://groups.google.com/forum/#!forum/exceldna) is the best place for general questions, comments etc.
Detailed bug reports and feature requests can be added to the GitHub issues list: https://github.com/Excel-DNA/IntelliSense/issues

I look forward to your feedback on this enhancement!

-Govert

Frank Halbach

unread,
Jun 22, 2016, 3:16:13 AM6/22/16
to Excel-DNA
Hi Govert, 

Fantastic News!

I'm testing with my existing add-in, all functions show intellisense.

Great Work!

Frank

Ron

unread,
Jun 22, 2016, 4:59:31 AM6/22/16
to Excel-DNA
Hi Govert,

The release note mentioned that there is an "integrated mode, where the IntelliSense library is part of another add-in". How does this work?

Thanks
Ron

Govert van Drimmelen

unread,
Jun 22, 2016, 7:27:34 AM6/22/16
to exce...@googlegroups.com

Hi Ron,

 

Yes, that’s right. There are some more detailed usage explanations on GitHub: https://github.com/Excel-DNA/IntelliSense/wiki/Usage-Instructions

To incorporate the ExcelDna.IntelliSense.dll into your library:

 

1. Install the (currently pre-release) NuGet package ExcelDna.IntelliSense. (In the Package Manager Console: PM> Install-Package ExcelDna.IntelliSense -Pre.)

 

2. The package adds references to three libraries:

·         ExcelDna.IntelliSense.dll

·         UIAComWrapper.dll

·         Interop.UIAutomationClient

·          

3. Register the IntelliSenseServer in your add-in's AutoOpen() implementation:

    using ExcelDna.Integration;

    using ExcelDna.IntelliSense;

    public class AddIn : IExcelAddIn

    {

        public void AutoOpen()

        {

            IntelliSenseServer.Register();

        }

 

        public void AutoClose()

        {

        }

    }

 

4. Finally (only needed for the packed add-in):

Add the reference entries in your .dna file, used for packing the extra libraries into the -packed.xll:

<DnaLibrary Name="IntelliTest Add-In" RuntimeVersion="v4.0">

  <ExternalLibrary Path="IntelliTest.dll" LoadFromBytes="true" Pack="true" />

 

  <Reference Path="ExcelDna.IntelliSense.dll" Pack="true" />

  <Reference Path="UIAComWrapper.dll" Pack="true" />

  <Reference Path="Interop.UIAutomationClient.dll" Pack="true" />

</DnaLibrary>

 

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

Frank Halbach

unread,
Jun 22, 2016, 9:27:01 AM6/22/16
to Excel-DNA
There is an issue with quotation marks. https://github.com/Excel-DNA/IntelliSense/issues/16

Ron

unread,
Jun 22, 2016, 9:39:37 AM6/22/16
to Excel-DNA
Thank you, I should have found it myself.
It works fine with a simple add-in with 1 function. But when I try integrating it into my main project, I get a lot of "Loader Lock" exceptions, which I can ignore, but in the end there is no intellisense. I will investigate on that, unless you have any idea.
Here is the exact error I get from Visual Studio:

Managed Debugging Assistant 'LoaderLock' has detected a problem in 'C:\Program Files\Microsoft Office 15\root\office15\EXCEL.EXE'.
Additional Information: 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.

I have the issue with Excel 2010 and 2013, 32bit, on Windows 7.


Govert van Drimmelen

unread,
Jun 22, 2016, 9:44:11 AM6/22/16
to exce...@googlegroups.com

Hi Frank,

 

That’s due to the fact that we don’t have any real formula parsing in place yet.

 

It’s files as issue #12 on GitHub too. Basically we need a better implementation of this:

 

        // TODO: This needs a proper implementation, considering subformulae

        // Works out the current function name and argument position for the given formula prefix.

        // E.g.    =MyFunc(1,

        //             should set the functionName to “MyFunc” and the currentArgIndex to 1 (0-based)

        //             Returns true if there is an open function in the formula

        internal static bool TryGetFormulaInfo(string formulaPrefix, out string functionName, out int currentArgIndex)

        {

            var match = Regex.Match(formulaPrefix, @"^=(?<functionName>[\w|.]*)\(");

            if (match.Success)

            {

                functionName = match.Groups["functionName"].Value;

                currentArgIndex = formulaPrefix.Count(c => c == ',');

                return true;

            }

            functionName = null;

            currentArgIndex = -1;

            return false;

        }

 

-Govert

 

From: exce...@googlegroups.com [mailto:exce...@googlegroups.com] On Behalf Of Frank Halbach
Sent: 22 June 2016 15:27
To: Excel-DNA <exce...@googlegroups.com>
Subject: [ExcelDna] Re: Excel UDF IntelliSense for Excel-DNA and VBA

 

There is an issue with quotation marks. https://github.com/Excel-DNA/IntelliSense/issues/16

 

--

Govert van Drimmelen

unread,
Jun 22, 2016, 9:49:18 AM6/22/16
to exce...@googlegroups.com

Hi Ron,

 

The loader lock warning is expected, and you can ignore it.

(And set the debugger to ignore it in future.)

 

I’ve made a simple add-in with it, and the IntelliSense seemed to work OK.

You have to have the second version from NuGet (ExcelDna.IntelliSense 0.1.2-beta2) as the first one did not have the extra UIAutomation dependencies.

 

Two more things to check:

1.       It only works if your Excel-DNA add-in is using version 0.32 or 0.33. For earlier Excel-DNA versions it won’t show anything.

2.       Check that the function wizard does display the right descriptions.

 

If it’s not that, I can help to debug some more.

 

-Govert

--

Ron

unread,
Jun 22, 2016, 10:12:17 AM6/22/16
to Excel-DNA
I was using the correct version. Actually, I was misguided by the exceptions and I modified a bit the code before making the debugger ignoring them. Finally, I realized that the issue came from the fact that I register my functions manually using "ExcelIntegration.RegisterMethods". If I do that after the "IntelliSenseServer.Register" then the functions are not taken into account by the display server.
I finally restored the call to "IntelliSenseServer.Register" after all the method registrations and it seems ok - I need to do more testing though.
This is fine for my use-case in production, but if someone wants to be able to register some functions manually after start-up (through some ribbon menu or whatever), then these functions will not have any intellisense. I guess it is still possible to recall IntelliSenseServer.Register every time a new function is registered, but this is not convenient.
Shall I open an issue on GitHub?

Govert van Drimmelen

unread,
Jun 22, 2016, 10:26:43 AM6/22/16
to exce...@googlegroups.com

Hi Ron,

 

I initially thought I would need some kind of ‘Refresh’ function, but removed it last week when I saw that it wasn’t used.

But your late registration case is exactly where we’d need that.

 

Yes – please open an issue.

 

-Govert

 

 

From: exce...@googlegroups.com [mailto:exce...@googlegroups.com] On Behalf Of Ron
Sent: 22 June 2016 16:12
To: Excel-DNA <exce...@googlegroups.com>
Subject: Re: [ExcelDna] Re: Excel UDF IntelliSense for Excel-DNA and VBA

 

I was using the correct version. Actually, I was misguided by the exceptions and I modified a bit the code before making the debugger ignoring them. Finally, I realized that the issue came from the fact that I register my functions manually using "ExcelIntegration.RegisterMethods". If I do that after the "IntelliSenseServer.Register" then the functions are not taken into account by the display server.

--

Ron

unread,
Jun 22, 2016, 10:52:16 AM6/22/16
to Excel-DNA
I have opened a new issue for this: 18.
I also created another one, 17: when the user selects the function suggested by the Intellisense, then a new pop-up should appear showing the argument list, but it does not.

Apart from that, it looks ok. Here is what I have tested (always Windows 7).
- Integrated display server without any packing, Excel 2010, Excel 2013 32bit
- Integrated display server, packing the 3 extra dlls, Excel 2010, Excel 2013 32bit, Excel 2013 64bit

Regards,
Ron

Terry Aney

unread,
Jun 24, 2016, 6:07:09 PM6/24/16
to Excel-DNA
Have you looked at https://github.com/spreadsheetlab/XLParser for parsing formulas?

Ron

unread,
Jun 27, 2016, 3:58:55 AM6/27/16
to Excel-DNA
Hi Terry,
This library looks interesting, however I am not sure whether that could work for the IntelliSense because it does not support incomplete formula. I have only tried the online version; when I typed "SUM(1" I got an error. The IntelliSense will have to work on incomplete formula 99% of the times.

Alan Stubbs

unread,
Jul 25, 2016, 5:33:59 PM7/25/16
to Excel-DNA
Hi Govert,

Have been experimenting with this and it is looking great!  A couple of minor things I notice: UDF Description is being truncated at 253 chars, as per the usual limitation, is there any way round this in the Intellisense - e.g. can I put it in a different field (not Description)?  Also, I notice the popup is disappearing off the right-hand side of the screen if the cell is far enough over - this is outside the Excel window too (it is fully on screen).  This is in Excel 2010 and 2016, both in 64-bit.

Thanks,

Alan

Govert van Drimmelen

unread,
Jul 31, 2016, 3:30:52 PM7/31/16
to exce...@googlegroups.com
Hi Alan,

Thanks for having a look at the IntelliSense extension, and for your feedback.

The description length limits are indeed left over from the way we truncate descriptions to fit in with Excel's restrictions. There is one workaround now, which is to create an .xml file with the longer descriptions. Descriptions in the external .xml file will take precedence over the attribute descriptions from the Excel-DNA registration.

In a future version of Excel-DNA itself, I'll try to store the untruncated descriptions, so that these can be seen directly in the IntelliSense. You can track this work item on GitHub: https://github.com/Excel-DNA/ExcelDna/issues/85

I've not given any attention to the positioning of the tooltip relative to the screen yet. You can track this work item on GitHub: https://github.com/Excel-DNA/IntelliSense/issues/13

Regards,
Govert


From: 'Alan Stubbs' via Excel-DNA [exce...@googlegroups.com]
Sent: 25 July 2016 11:33 PM
To: Excel-DNA
Subject: Re: [ExcelDna] Re: Excel UDF IntelliSense for Excel-DNA and VBA

--

Alan Stubbs

unread,
Aug 7, 2016, 6:29:06 PM8/7/16
to Excel-DNA
Thanks Govert, I'll try the external xml file - found the usage guide for it.

Alan
To post to this group, send email to exc...@googlegroups.com.

Govert van Drimmelen

unread,
Nov 24, 2016, 9:49:57 AM11/24/16
to Excel-DNA
The first official release of the IntelliSense extension is now available.
This includes support for UDFs made with Excel-DNA, VBA and even Python (using PyXLL).

Bogey

unread,
Nov 30, 2016, 5:49:55 AM11/30/16
to Excel-DNA
Great project! Will hopefully have a chance to try it out soon.

Two ideas for this:

1. One thing I've always been missing - a lot - in Excel (including VBA etc.) is the propert support of parameters of an Enum type.
Say, when you're using the built-in =MATCH() function, when entering the last parameter (match_type), you actually get a selectable dropdown showing what each of the numeric value means.
Wonder whether it's possible to extend your library to include something similar for Custom enums in the future?

2, and this is a very far stretch.. I wonder whether it'd be possible to abuse this for in-place IntelliSense dropdowns when entering normal text (no formulas) into Excel cells?
Rationale behind this - I finally had a chance to work on a Roslyn-based scripting addin last weekend. Will hopefully have something to share soon. Anyway, not sure its feasible at all, probably not - but of course it would be amazing to implement Visual Studio-like intellisense when writing Code as plain text in regular cells. Having an API which allows you to trigger/display dropdowns, as well as somehow read and change the current text input in that cell (in spite of Excel being in busy state) would be huge for something like that.

Govert van Drimmelen

unread,
Nov 30, 2016, 6:09:44 AM11/30/16
to exce...@googlegroups.com

Hi Bogey,

 

I look forward to your feedback on the IntelliSense once you’ve tried it.

It was quite tricky to put together, so for the next year or so I just hope to see whether people actually find it useful, and ensure that it is as stable as possible, rather than extend it with new functionality.

 

As a further extension, certainly the enum option would be a good feature to try to add. It would also need some more advanced communication between the add-in and the IntelliSense service. But there’s no fundamental reason why that can’t work.

 

Adding a general callback mechanism to the cell editing, so that you can extend the IntelliSense to non-function text, should be possible too. Again designing the callback API would be one tricky part.

 

Maybe you can add these suggestions to the IntelliSense GitHub Issues list, so that we at least gather a list of feature requests?

 

-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 post to this group, send email to exce...@googlegroups.com.

Frank Halbach

unread,
Nov 30, 2016, 11:09:44 AM11/30/16
to Excel-DNA
Govert,

Just like to let you know that Excel-Dna-Intellisense is very useful! 

I have a function with 14 arguments which basically queries a data warehouse (customer, period, year,plant,product,account, etc). After a while you have memorized the argument options but it was almost impossible to know in which argument you are while typing the function directly in Excel.

Intellisense lets me enter the function directly w/o using the function wizard.

It's very much appreciated.

Thanks again,

Frank

Bogey

unread,
Nov 30, 2016, 4:07:46 PM11/30/16
to Excel-DNA
Hi Govert,

very understandable. Haven't had a chance to look at the implementation yet, but can only imagine you had to jump through a lot of hoops code-design wise to make this project work - sounds very reasonable to test this extensively first.
I've added both ideas to Github for potential future tracking.

Gert-Jan Fien

unread,
Dec 5, 2016, 10:29:10 AM12/5/16
to Excel-DNA
Hi Govert!

I'm struggling to find the download for the NuGet package. Do you have a link?

Govert van Drimmelen

unread,
Dec 5, 2016, 10:38:07 AM12/5/16
to exce...@googlegroups.com

 

From: exce...@googlegroups.com [mailto:exce...@googlegroups.com] On Behalf Of Gert-Jan Fien
Sent: 5 December 2016 17:29
To: Excel-DNA <exce...@googlegroups.com>
Subject: [ExcelDna] Re: Excel UDF IntelliSense for Excel-DNA and VBA

 

Hi Govert!

--

Gert-Jan Fien

unread,
Dec 5, 2016, 10:55:43 AM12/5/16
to exce...@googlegroups.com
Thanks, Govert. I had found that site, but using the Package Console Manager gives me no joy yet. Does this mean anything  to you...

Inline images 1

Gert-Jan Fien
Oman mob.: (+968) 9110 5306

To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+unsubscribe@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.

--
You received this message because you are subscribed to a topic in the Google Groups "Excel-DNA" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/exceldna/znanLfLcNkk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to exceldna+unsubscribe@googlegroups.com.

Govert van Drimmelen

unread,
Dec 5, 2016, 11:03:57 AM12/5/16
to exce...@googlegroups.com

Are you able to access the index at

     https://api.nuget.org/v3/index.json

from a browser?

 

I can, and get back some json document.

(And the package installation works fine here.)

 

-Govert

--

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.

--
You received this message because you are subscribed to a topic in the Google Groups "Excel-DNA" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/exceldna/znanLfLcNkk/unsubscribe.

To unsubscribe from this group and all its topics, 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.

 

--

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.

Gert-Jan Fien

unread,
Dec 5, 2016, 11:17:09 AM12/5/16
to exce...@googlegroups.com
Nope!  Can't reach that site. Something to do with being in Oman? Grrrr!  Any other routes available, that you know of?


Gert-Jan Fien
Oman mob.: (+968) 9110 5306

--

To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+unsubscribe@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.

--
You received this message because you are subscribed to a topic in the Google Groups "Excel-DNA" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/exceldna/znanLfLcNkk/unsubscribe.

To unsubscribe from this group and all its topics, send an email to exceldna+unsubscribe@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.

--
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+unsubscribe@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.

--
You received this message because you are subscribed to a topic in the Google Groups "Excel-DNA" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/exceldna/znanLfLcNkk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to exceldna+unsubscribe@googlegroups.com.

Gert-Jan Fien

unread,
Dec 5, 2016, 11:24:39 AM12/5/16
to exce...@googlegroups.com
Fixed it.  Just remembered I have a perfectly good VPN. That gave me access straightaway.

Gert-Jan Fien
Oman mob.: (+968) 9110 5306

Message has been deleted

Fabian

unread,
Dec 7, 2016, 5:03:41 PM12/7/16
to Excel-DNA
I've just tried including this within an existing AddIn of mine; in principle, it works very nicely (using Excel 2013 64 bit on my end) and so far, I find it really useful!

I'd maybe consider putting into the readme that IntelliSenseServer.Register(); needs to be called after function registration (in particular when using in conjunction with manual registrations), and maybe a quick note pointing out there is a .Refresh() function available.
Nothing major, but potentially saves a few minutes of trial & error when using this with registrations for the first time.

Other than that, great feature, and I haven't encountered any particular issues with it so far.

Fabian

zhenyu Chen

unread,
Dec 9, 2016, 3:25:23 PM12/9/16
to Excel-DNA
Hi Govert,

When i use IntelliSense, I got everything work well but the list shows slowly, and sometimes the list is stuck.


Govert van Drimmelen

unread,
Dec 9, 2016, 3:36:10 PM12/9/16
to exce...@googlegroups.com
What version of Excel are you using?
How long are the delays?
Does the whole of Excel get 'stuck' when this happens?

Something like this has been reported here: https://github.com/Excel-DNA/IntelliSense/issues/42

I have no idea what the problem might be.

-Govert

Brett Ables

unread,
Mar 9, 2017, 5:49:40 PM3/9/17
to Excel-DNA
I'm loving this capability! Thank you so much!

The first thing I did after getting it working for my Add-In and playing with doing VBA functions was working on a better way to do the VBA markup without any external XML.  Since the custom XML parts methods just needs a string, there is no need to store a separate XML file, plus the XML can be generated programmatically if we came up with a better way to annotate functions.  My first idea was a data structure made up of custom types.  It's a bit clunky, but easier than editing the XML strings in VBA.

Public Type VBAArgument
    Name As String
    Description As String
End Type

Public Type VBAFunction
    Name As String
    Description As String
    args() As VBAArgument
End Type

Public Type VBAFunctionCollection
    funcs() As VBAFunction
End Type

Public Function MyVBAFunction(FirstArg, AnotherArg)

    MyVBAFunction = FirstArg + AnotherArg

End Function

Function VBAFunctionDescriptions() As VBAFunctionCollection
' Describe your functions here using VBAFunction and VBAArgument objects
'
' Demo:
'    Dim func1 As VBAFunction
'    Dim arg1 As VBAArgument
'    Dim arg2 As VBAArgument
'
'    func1.Name = "MyVBAFunction"
'    func1.Description = "My custom function with Intellisense"
'    arg1.Name = "FirstArg"
'    arg1.Description = "The first argument"
'    arg2.Name = "AnotherArg"
'    arg2.Description = "The second argument"
'
'    ReDim func1.args(1 To 2)
'    func1.args(1) = arg1
'    func1.args(2) = arg2
'
'    ReDim functions.funcs(1 To 1)
'    functions.funcs(1) = func1

    Dim func1 As VBAFunction
    Dim arg1 As VBAArgument
    Dim arg2 As VBAArgument
    
    func1.Name = "MyVBAFunction"
    func1.Description = "My custom function with Intellisense"
    arg1.Name = "FirstArg"
    arg1.Description = "The first argument"
    arg2.Name = "AnotherArg"
    arg2.Description = "The second argument"
    
    ReDim func1.args(1 To 2)
    func1.args(1) = arg1
    func1.args(2) = arg2
    
    ReDim VBAFunctionDescriptions.funcs(1 To 1)
    VBAFunctionDescriptions.funcs(1) = func1
    
End Function

Sub EmbedIntelliSense()
    'This will store the Macro descriptions in the current workbook
    'New descriptions will be available the next time the workbook is loaded.
    
    Dim fcol As VBAFunctionCollection
    Dim func As VBAFunction
    Dim arg As VBAArgument

    fcol = VBAFunctionDescriptions()
    
    txt = "<IntelliSense xmlns=""http://schemas.excel-dna.net/intellisense/1.0"">"
    
    For iFunc = LBound(fcol.funcs) To UBound(fcol.funcs)
        func = fcol.funcs(iFunc)
        txt = txt & "<FunctionInfo><Function Name=""" & func.Name & """ Description=""" & func.Description & """>"
        
        For iArg = LBound(func.args) To UBound(func.args)
            arg = func.args(iArg)
            
            txt = txt & "<Argument Name=""" & arg.Name & """ Description=""" & arg.Description & """ />"
            
        Next
        
        txt = txt & "</Function>"
        
    Next
    
    txt = txt & "</FunctionInfo></IntelliSense>"
    
    'Remove Existing IntelliSense CustomXML Parts
    For Each part In ThisWorkbook.CustomXMLParts
        If part.DocumentElement Is Nothing Then
            'Skip
        ElseIf part.DocumentElement.BaseName = "IntelliSense" Then
            part.Delete
        End If
    Next
    
    ThisWorkbook.CustomXMLParts.Add txt
End Sub


Brett Ables

unread,
Mar 9, 2017, 6:06:22 PM3/9/17
to Excel-DNA
Thinking further.... it would be great if Intellisense could work off of an agreed-upon comment-based annotation syntax like:

Public Function MyVBAFunction(FirstArg, AnotherArg)
':Description: My custom function with Intellisense
':Argument FirstArg: The first argument
':Argument AnotherArg: The second argument

    MyVBAFunction = FirstArg + AnotherArg

End Function

I know people have written Add-ins before that can inspect VBA code and work with the VBEditor object model, so it seems theoretically possible.  I have a lot more experience with Python and in that world, Sphinx documentation tools and IDE's like PyCharm take great advantage of Docstring formatting to provide parameter hinting, documentation, type checking, and even to build interfaces (see docopt).  Just thought I'd throw my ideas on the pile.

If the Intellisense really needs the XML to work, then perhaps a separate project could handle generating the XML from function annotations.  The dream would be for folks to be able to work directly in the VBA editor and see the Intellisense in real time.

Currently it also seems I have to reload the workbook for the Intellisense to update after I update the CustomXMLParts, so finding a way to make that more dynamic would also be necessary for edits in the VBA Editor to re realized a moment later in the spreadsheet.

Govert van Drimmelen

unread,
Mar 10, 2017, 9:23:12 AM3/10/17
to Excel-DNA
The IntelliSense add-in could certainly be extended to find the descriptions in another way. But as your example above shows, converting it to xml is not really a big problem.

For the comment/embedded description, the tough work would be parsing the modules, and event that should not be too hard.
It's a great idea, and not something I'll be working on, so I'd encourage you to give it a go :-)

-Govert

Ganesh Shivshankar

unread,
Mar 14, 2017, 8:21:55 AM3/14/17
to Excel-DNA
Works very well!

FastExcel

unread,
Apr 7, 2017, 4:33:10 PM4/7/17
to Excel-DNA

Is there a way of packing the IntellSense xll inside an unrelated xll so that when opening/loading the unrelated xll it all works? Or do we need seperate opens or loads?

Govert van Drimmelen

unread,
Apr 7, 2017, 4:45:51 PM4/7/17
to exce...@googlegroups.com
The design is that one instance of the IntelliSense must be loaded, and it will present the IntelliSense for all loaded .xll add-ins (and VBA or other add-ins like PyXLL). It doesn't matter which .xll add-in loads the IntelliSense - it can be the pre-built ExcelDna.IntelliSense.xll add-in or a regular Excel-DNA add-in that also embeds and loads the IntelliSense service.

Multiple add-ins with the IntelliSense negotiate and ensure they load only the newest version available.

-Govert


From: exce...@googlegroups.com [exce...@googlegroups.com] on behalf of FastExcel [cha...@decisionmodels.com]
Sent: 07 April 2017 10:33 PM
To: Excel-DNA

Subject: [ExcelDna] Re: Excel UDF IntelliSense for Excel-DNA and VBA

Is there a way of packing the IntellSense xll inside an unrelated xll so that when opening/loading the unrelated xll it all works? Or do we need seperate opens or loads?

Soco Zarzour

unread,
Apr 9, 2017, 7:34:54 AM4/9/17
to Excel-DNA
can any one help me?
I downloaded the NuGet IntelliSense
but nothing work?

Imports ExcelDna.Integration
Public Module MyFunctions

    <ExcelFunction(Description:="aaaaa")>
    Function AddNumbers(
        <ExcelArgument(Description:="is the first number, to which will be added", Name:="First number")> number1 As Double,
        <ExcelArgument(Description:="is the second number that will be added", Name:="Second number")> number2 As Double)

        AddNumbers = number1 + number2

    End Function

End Module



Windows 10 64 bit + excel 2016 32bit

Govert van Drimmelen

unread,
Apr 9, 2017, 7:42:31 AM4/9/17
to exce...@googlegroups.com
You should check the detailed Usage Instructions here:  https://github.com/Excel-DNA/IntelliSense/wiki/Usage-Instructions

You either need to load the pre-built ExcelDna.IntelliSense.xll add-in from here: https://github.com/Excel-DNA/IntelliSense/releases

Or if you are add-in the NuGet package to you own add-in, you need to follow the instuctions for an "Integreated display server", including calling IntelliSenseServer.Register() from your AutoOpen routine.

WARNING: You can test it, but there are still some problems with the recent Excel 2016 updates - see this issue: https://github.com/Excel-DNA/IntelliSense/issues/42

-Govert

Soco Zarzour

unread,
Apr 9, 2017, 10:23:09 AM4/9/17
to Excel-DNA
i read every thing

make  a  new class

download EXCEL DNA addin from NuGet

copy the example
run

worked fine

download EXCEL DNA  IntelliSense from NuGet

Run

same example

Nothing new happend

where is my mistake

VB.net 2015

Govert van Drimmelen

unread,
Apr 9, 2017, 10:28:23 AM4/9/17
to exce...@googlegroups.com
Did you call IntelliSenseServer.Register in you add-in?

-Govert



From: exce...@googlegroups.com [exce...@googlegroups.com] on behalf of Soco Zarzour [zarzou...@gmail.com]
Sent: 09 April 2017 04:23 PM

To: Excel-DNA
Subject: [ExcelDna] Re: Excel UDF IntelliSense for Excel-DNA and VBA
--

Soco Zarzour

unread,
Apr 9, 2017, 10:36:21 AM4/9/17
to Excel-DNA
many thanks

Nope

how do i call it and when??

after the function or before

Soco Zarzour

unread,
Apr 9, 2017, 10:40:10 AM4/9/17
to Excel-DNA
I new to this

so I could doing something wrong here

Govert van Drimmelen

unread,
Apr 9, 2017, 10:53:50 AM4/9/17
to exce...@googlegroups.com

WARNING: You can test the IntelliSense feature, but there are still some problems with the recent (Nov. 2016) Excel 2016 updates - see this issue: https://github.com/Excel-DNA/IntelliSense/issues/42

Easiest is if you just download and open the pre-built ExcelDna.IntelliSense.xll add-in from here: https://github.com/Excel-DNA/IntelliSense/releases
Then you don't have to do anything else.

If you use the NuGet package, then you need to call IntelliSenseServer.Register() when your add-in is loaded.
You do this be adding a class that implements the IExcelAddIn interface, and calling it from the AutoOpen() method:

Imports ExcelDna.Integration
Imports ExcelDna.IntelliSense

Public Class AddIn
    Implements IExcelAddIn

    Public Sub AutoOpen() Implements IExcelAddIn.AutoOpen
        IntelliSenseServer.Register()
    End Sub

    Public Sub AutoClose() Implements IExcelAddIn.AutoClose
    End Sub

End Class

-Govert

Soco Zarzour

unread,
Apr 9, 2017, 11:09:26 AM4/9/17
to Excel-DNA
the second Method worked like a charmed 
Imports ExcelDna.Integration
Imports ExcelDna.IntelliSense

Public Class AddIn
    Implements IExcelAddIn

    Public Sub AutoOpen() Implements IExcelAddIn.AutoOpen
        IntelliSenseServer.Register()
    End Sub

    Public Sub AutoClose() Implements IExcelAddIn.AutoClose
    End Sub

End Class


thanks for the help

BS: You should add this to read me in the add in


Soco Zarzour

unread,
Apr 10, 2017, 3:35:27 AM4/10/17
to Excel-DNA
Easiest is if you just download and open the pre-built ExcelDna.IntelliSense.xll add-in from here: https://github.com/Excel-DNA/IntelliSense/releases
Then you don't have to do anything else.

How can I use it?

I'm a beginner in VB.net and Excel DNA

Govert van Drimmelen

unread,
Apr 10, 2017, 6:14:24 AM4/10/17
to exce...@googlegroups.com

WARNING: You can test the IntelliSense feature, but there are still some problems with the recent (Nov. 2016) Excel 2016 updates - see this issue: https://github.com/Excel-DNA/IntelliSense/issues/42

 

You download the .xll and open in Excel, either with File->Open or in the add-ins dialog (Atl+t,i).

(You can load it before or after your own add-in is loaded, it should not matter.)

When the ExcelDna.IntelliSense.xll is loaded at the same time as your add-in, it should show the intellisense info for your add-in.

 

It is more convenient than using the NuGet package if you want to easily enable or disable the IntelliSense, which might be the case if you’re running Excel 2016, because of the bug introduced by Microsoft’s November 2016 update to Excel 2016.

 

-Govert

Soco Zarzour

unread,
Apr 10, 2017, 9:50:36 AM4/10/17
to Excel-DNA
thanks

I know what happen

my antivirus (Kaspersky) Block excelDNA  as not  a Trusted program or dll  "Access to Moduls is block"

that what happen and when i allow it , it works just fine
Reply all
Reply to author
Forward
0 new messages