Functions from XLL Addd-In are not available

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

Functions from XLL Addd-In are not available
Excel show #NAME error instead of the UDF from the XLL Add-In 
Dirk




Posts: 73
Joined: 2017-10-05
You proposed to manipulate the msi and create a customer action that deregisters the registry keys.

1) I do not know which keys are created by AddIn Express adxregister.
2) First we register only just to remove. That sounds some kind of odd to me.
3) If the result of registering the XLL Modul is removed what is the difference between not registering at all?
4) For debugging and development we are fine. We found no problem so far.
5) We do not use the AddInExpress context menu in visual studio to register the classes, we use a batch which simply calls "adxregister". This has the benefit, that we do not need to run visual studio with admin rights.
6) What do you mean by play a role in deployment process?
7) I need the XLL but without the registering it. This offers many new options to install the AddIn we need.
8) I really do not want to loose your support. But I need a much simpler solution for the problem then patching the MSI.
9) Can you provide a simpler solution for my problem?
10) What exactly does RegisterXLL? Do you only add some registry keys?

Best regards
Dirk
Posted 10 Apr, 2019 08:30:57 Top
Andrei Smolin


Add-in Express team


Posts: 17357
Joined: 2006-05-11
Hello Dirk,

#1. When talking about your XLL module, registering it creates the value we describe in section "Locating Excel UDF Add-ins in the Registry".

#2. As explained, there's no such feature in the XLL module: we've never got such a requirement.

#3. I don't see any difference.

#5. We are okay with this.

#6. Applying the ComRegisterFunctionAttribute to a method guarantees that the method will be invoked when the assembly is registered for COM interop; see https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.comregisterfunctionattribute?view=netframework-4.7.2. This is always the case with the add-in projects that Add-in Express creates. Note that the method marked with this attribute invokes AddinExpress.MSO.ADXXLLModule.RegisterXLLInternal(t).

#7. Tomorrow, I'll check whether commenting out the AddinExpress.MSO.ADXXLLModule.RegisterXLLInternal(t) and AddinExpress.MSO.ADXXLLModule.UnregisterXLLInternal(t) calls is what you need.

These methods create and delete a registry value in HKEY_CURRENT_USER\Software\Microsoft\Office\{Office version}.0\Excel\Options (for all installed Excel versions. Or, if LoadAtStartup on the XLL module is set to false, these methods XLL is registered as "turned off" in HKEY_CURRENT_USER\Software\Microsoft\Office\{version}.0\Excel\Add-in Manager. I'll also check if using LoadAtStartup may be of value for you.

#10. RegisterXLL? If you talk about RegisterXLLInternal, see above.

If you think I've missed something, please point me to such an omission.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 10 Apr, 2019 09:48:52 Top
Dirk




Posts: 73
Joined: 2017-10-05
Thanks for you answers and checking.

If we use ExcelApp.RegisterXll() we do not need any registry keys for the ADXXLLModule module.
ExcelApp.RegisterXll() does not create any (known to me) registry entries.
If I understand right the ADXXLLModule is not a COM Add-In and therefor does not need a registration Software\Classes COM area.
If we do not use the ADXXLLModule as a Add-In, but only as a container for our UDF, then excel although does not need any registry keys for that.

So this is my goal:
Register the ADXAddinModule as COM Object in Software\Classes und as COM Addin in Excel in Software\Microsoft\office\Excel\Addins\.
Use ExcelApp.RegisterXll() to register the UDF defined in the ADXXLLModule but without registering it as an Excel Add-In which is to me completely needless.

#10 Yes I meant: RegisterXLLInternal
#1 HKEY_CURRENT_USER\Software\Microsoft\Office\{Office version}.0\Excel\Options OPEN, As you probably know that for each AddIn there is an addition entry in OPEN1, OPEN2 and so on. This make it harder to remove it, because it could by any OPENX key. I don't know if this is possible in MSI Paket out of the box.
Posted 11 Apr, 2019 03:46:39 Top
Andrei Smolin


Add-in Express team


Posts: 17357
Joined: 2006-05-11
Hello Dirk,

You can set the ComVisible attribute on the XLL module to false. In this case, the registrar wont register the XLL.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 11 Apr, 2019 06:13:51 Top