Excel Add-in - Function Wizard shows strange functions

F

Franck

Hi,
Just coded a little add-in which add several functions to Excel.
Works great.

Anyway, in Excel's function wizard,
If i Select my add-in in the Category, a strange list of functions
appears :
All my functions and these ones :
-Equals
-GetType
-ToString

How can I Hide these functions ?
Where are they from (not in my class but assuming these are default
functions)...

Thks for help
 
F

Fredrik Wahlgren

Franck said:
Hi,
Just coded a little add-in which add several functions to Excel.
Works great.

Anyway, in Excel's function wizard,
If i Select my add-in in the Category, a strange list of functions
appears :
All my functions and these ones :
-Equals
-GetType
-ToString

How can I Hide these functions ?
Where are they from (not in my class but assuming these are default
functions)...

Thks for help

You used a .NET language, right? I had the same problem. The reply I got was
"Those methods are inherited from Object. Every .NET class has them". If
you really want to get rid of them, you have to write a shim dll.

/Fredrik
 
F

Franck

I used the "Office Tool Com ShimWizards".
But, searching for these @# functions is unsuccesfull.
Where are thye listed ?
 
F

Fredrik Wahlgren

Franck said:
I used the "Office Tool Com ShimWizards".
But, searching for these @# functions is unsuccesfull.
Where are thye listed ?

Ahh, this explains the problem. Actually, it occured to me after I hit the
"Send" button. What you have created is a COM add-in shim for the
IDTExtensibility2 interface. Your user defined functions are not called thru
this interface. I have found some articles that you should read

http://blogs.officezealot.com/whitechapel/archive/2004/08/29.aspx
http://blogs.msdn.com/eric_carter/archive/2004/12/01/273127.aspx
http://support.microsoft.com/default.aspx?kbid=291392


What you need to do is to manually add these functions to the shim dll. The
shim wizard doesn't do this. This can be somewhat tricky if your UDF takes
something like a Range as a parameter. It's much easier if you use things
like integers, strings and doubles. I haven't used the shim but I believe it
essentially creates a standard ATL COM dll. Does it use Attributes? I did
create a UDF using ATL and I found that Excel won't recognize the dll if you
create an attributed ATL project.

Please tell more about your functions.

Best Regards,
Fredrik
 
F

Franck

Simples requests (string, integer and stuff like this in params and
returned values).
Doing the link to company's database through Web Services and proxys
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top