Register XLL manuelly does not show the correct add in name name

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

Register XLL manuelly does not show the correct add in name name
ADXXLLModule.AddinName is not used. 
Dirk




Posts: 73
Joined: 2017-10-05
Hello ,

if we register a XLL Add-In in excel by using the ExcelApp.AddIns2.Add(<our addin>) from our com add, (which is already loaded) the name of the add-in is :
"AdxLoader.<name>". I expect that the name of the add-in is the name provided in the ADXXLLModule.AddinName property.

I try the installation with Excel AddIn Manager. If I add the xll add-in there the name is shown correctly.

best regards.
Posted 22 Mar, 2019 03:46:49 Top
Andrei Smolin


Add-in Express team


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

This is how you can register an Add-in Express based XLL:

string assemblyPath = ...; 
ExcelApp.RegisterXLL(Path.Combine(Path.GetDirectoryName(assemblyPath), "adxloader.dll")); 



Andrei Smolin
Add-in Express Team Leader
Posted 22 Mar, 2019 05:08:28 Top
Dirk




Posts: 73
Joined: 2017-10-05
if I do

this.ExcelApp.RegisterXLL(adxloaderFullPath);

I get:

System.NullReferenceException:
at AddinExpress.MSO.ADXXLLModule.Dispose(Boolean disposing)

if I do

ExcelApp.AddIns.Add(adxloaderFullPath);

It works fine.

What should I do?

Without debugger it doesn't crash, but der XLL AddIn was not shown in the Add In Manager from excel but the function from the xll add are availble in excel.
Posted 22 Mar, 2019 06:24:17 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
Dirk Reu? writes:
this.ExcelApp.RegisterXLL(adxloaderFullPath);


This line makes sense in the COM add-in only.


Andrei Smolin
Add-in Express Team Leader
Posted 22 Mar, 2019 06:33:34 Top
Dirk




Posts: 73
Joined: 2017-10-05
Ok. but as said, the XLL Add-In is not shown as Addin in the excel add in manager.
If we use adxregistrator the XLL-AddIn is shown in the addin manager from excel.
I except the Xll Add In to be shown. Or did I misunderstood something?
Furthermore if I use the AddIns.Add Method, the Add In is shown in the Add In Manager from excel but shows the wrong name.
If I restart excel, the name is correct and the result looks like as if we had installed it using adxregistrator.
Posted 22 Mar, 2019 06:50:07 Top
Dirk




Posts: 73
Joined: 2017-10-05
The AddIns.Add method does as a result not register a COM Add-In. I can verify this if I have a look in the registry
Computer\HKEY_CURRENT_USER\Software\Microsoft\office\16.0\Excel\Options
The entry OPEN=/R "pathto\adxloader.addinname.dll" exists after I use AddIns.Add.
That means it is not a com add in.
A COM Add-In would register in the Computer\HKEY_CURRENT_USER\Software\Microsoft\office\Excel\Addins section with its procid as key.
Posted 22 Mar, 2019 07:02:05 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
Dirk,

XLL is not a COM add-in, correct. Calling XLLRegister turns the XLL add-in on.

Dirk Reu? writes:
AddIns.Add


This is for Excel add-ins. To register a COM add-in, you need to use adxregistrator.exe' to turn a COM add-in on, you need to use ExcelAoo.COMAddins[strMyComAddinProgId].Connect = true.


Andrei Smolin
Add-in Express Team Leader
Posted 22 Mar, 2019 07:12:10 Top
Dirk




Posts: 73
Joined: 2017-10-05
Back to the beginning. I'm a little confused.
We have two Add-Ins:
1) a COM Add-In based on AddinExpress.MSO.ADXAddinModule. Here we have implemented the logic and Ribbon Menu.
2) a XLL Add-in based on AddinExpress.MSO.ADXXLLModule. Here some functions are defined.

Normally both addins are install by adxregistrator.

In some cases this does not work. The xll addin is not available in excel and therefor the function in excel are not available too. (Excel shows #NAME for that function) The COM add-in is installed und working fine.

How do I register the XLL Add-In, so that this is shown in the excel Add-In manager?

best regards
Posted 22 Mar, 2019 07:32:02 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
Dirk,

You may not be able to register the add-in if it didn't register at the install time. If there's an issue at the install time, you are expected to check the adxregistrator.log file, solve the issue (this may be: rebuilding the installer, change settings on the target machine, get required permissions, let an admin allow you to write to certain locations, etc.) and restart the installer.


Andrei Smolin
Add-in Express Team Leader
Posted 22 Mar, 2019 07:42:40 Top
Dirk




Posts: 73
Joined: 2017-10-05
You are right im most arguments.
But:
We have a scenario where the COM Add-In is registered and running and the XLL Add-In is not. That is what I want to solve.
The scenario is:
1) Install the two add-ins for all users.
2) The XLL cannot be installed for all users and therefor is installed to the user who executed the msi.
3) The COM Add-In is visible to all users.
4) If a user logs on to the machine and the XLL Add-In is not registered, then register the XLL Add-In.
5) The result is a "per machine" installation for all users that log on to that machine.
Posted 22 Mar, 2019 08:03:20 Top