excel cell popup list

Add-in Express™ Support Service
That's what is more important than anything else

excel cell popup list
how to add a function to a cell's popup list 
s.joly




Posts: 7
Joined: 2010-08-25
I developed an excel addin with one function called 'MyTestFunc()'. When I press the formula-button in the toolbar, my function appears in the list and I can select it. So far, so good.

But how can I add the function in the popup list when I type '=M' in a cell? It's simply not there. :(

tnx.
Posted 14 Sep, 2010 10:20:06 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hi s.joly,

Please check http://www.add-in-express.com/docs/net-excel-udf-tips.php#xll-no-descriptions.


Andrei Smolin
Add-in Express Team Leader
Posted 14 Sep, 2010 10:41:58 Top
s.joly




Posts: 7
Joined: 2010-08-25
Thanks, I'll check it out.
Posted 15 Sep, 2010 03:20:02 Top
s.joly




Posts: 7
Joined: 2010-08-25
When the user enters a formula in the Formula Bar, neither Excel Automation add-ins nor XLL add-ins show function descriptions as well as descriptions of function parameters (available for XLLs only). Debugging this problem shows that Excel just doesn't call any methods responsible for providing that info.

Does that mean it will never work in addin express?

(I had it working in a c++ project with microsoft's xlcall and xlframewrk)
Posted 15 Sep, 2010 09:46:54 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hi s.joly,

Hmm, there's a probability that we missed something when testing that situation. Can you tell me what method is called when the description is going to be shown? BTW, are we talking about showing the description when editing a formula in the Formula Bar?


Andrei Smolin
Add-in Express Team Leader
Posted 16 Sep, 2010 06:57:03 Top
s.joly




Posts: 7
Joined: 2010-08-25
The problem:
- Focus an empty cell
- type "=M"

Now, excel shows a popup list with all known formulas beginning with an "M". But MyTestFunc isn't there.


How I did that in C++ with the xl framework:

BOOL __stdcall xlAutoOpen(void)
{
Excel(xlfRegister,0,10,(LPXLOPER)&xDll,
"MyTestFunc", // proc name
"RR", // type text
"MyTestFunc", // function text
"MyParam", // args
"1", // macro type
"MyTestCategory", // category
"", // shortcut
"", // help topic
"This is the description", // function help
""); // args help
}

xlAutoOpen gets called automaticaly by excel.

btw: this is a simplified c++ example. For instance as you probably know, the first byte of a string should contain the length, ...
Posted 20 Sep, 2010 07:43:43 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Oh, thank you very much for the code!

I'm sorry for misunderstanding your situation; for some reason I thought that you had a different problem. The question I was trying to answer was: Why doesn't Excel show the description of a UDF function when entering a formula referencing the UDF? And you were talking about function names, not descriptions...

Back to your original question. Of course, we've tested this situation. Our results are as follows: if a UDF is defined in an Excel Automation add-in, Excel doesn't show the UDF name when you enter a formula. This isn't a bug or a slip in our code.

Your code deals with another UDF type called XLL. But for XLL add-ins the situation is different: Excel does show the names of the UDFs. This is also true for an XLL add-in developed with the .NET edition of Add-in Express (the VCL edition doesn't support developing XLL add-ins).

But... Excel doesn't show the descriptions of the UDF and its parameters using the UDF in the Formula Bar; that's what the link I posted above states.

Hope this makes sense.


Andrei Smolin
Add-in Express Team Leader
Posted 21 Sep, 2010 08:35:41 Top
s.joly




Posts: 7
Joined: 2010-08-25
It makes sense.

Is the VCL version going to support XLL add-ins somewhere in the future?
Posted 06 Oct, 2010 08:05:31 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hi s.joly,

I doubt it.


Andrei Smolin
Add-in Express Team Leader
Posted 06 Oct, 2010 08:11:10 Top