ExcelApp.RegisterXLL vs. ADXXLLModule and adxregister.exe

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

ExcelApp.RegisterXLL vs. ADXXLLModule and adxregister.exe
What is the best solution the create UDFs? 
Subscribe
Dirk




Posts: 73
Joined: 2017-10-05
Hello,
we are using a COM Add-In (AddinModule) and XLL AddIn (ADXXLLModule) for Excel.
The XLL Add-In is only to register some XLL functions (UDF). We use currently adxregister to install the XLL user defined functions.
I learned that we can use ExcelApp.RegisterXLL to register XLL functions.

a) Which approach should we use to create UDFs?
b) After register XLL there XLL Add-In is show in the Add-In Manager for excel add-in. Is that important for having UDFs?
c) If I use ExcelApp.RegisterXLL no Add-in is show in the excel add-in manager, but the UDF are available. Is that correct?
d) Can I call ExcelApp.RegisterXLL in addition to installing the XLL Add-IN with adxregister?

best regards.
Posted 26 Mar, 2019 05:57:32 Top
Dmitry Kostochko


Add-in Express team


Posts: 2811
Joined: 2004-04-05
Hi Dirk,

a) Which approach should we use to create UDFs?


I would suggest using adxregistrator.exe for registering your Add-in Express based solutions including COM Add-ins, XLLs, UDFs and so on.

b) After register XLL there XLL Add-In is show in the Add-In Manager for excel add-in. Is that important for having UDFs?


It is the default behavior.

c) If I use ExcelApp.RegisterXLL no Add-in is show in the excel add-in manager, but the UDF are available. Is that correct?


I think yes, correct. The RegisterXLL method registers XLL only.

d) Can I call ExcelApp.RegisterXLL in addition to installing the XLL Add-IN with adxregister?


As I mentioned above, using adxregistrator.exe is the supported and recommended way. Of course, you can call the RegisterXLL method, but what for? Adxregistrator.exe has registered your XLL already, hasn't it?
Posted 26 Mar, 2019 07:31:48 Top
Dirk




Posts: 73
Joined: 2017-10-05
We have large problems with registering the XLL module with adxregister.
a) We have two add-ins in the list of installed add-ins but have only one product. This is confusing our customers.
b) In the following scenario it is not always possible to use adxregister:
- install com and xll add-in for on the machine. xll can only be register for a user in the registry.
- if an other user logs onto that machine, we expect com and xll are available. But this not the case.
so our idea is, that the com add-in register the xll add-in.
This is the way we can install our add-in for all user on a machine.
This scenario is vital for use, because it allows us to roll out the add-in on terminal server an large managed it- infrastructures, where running a setup from a single user is not allowed.
c) sometimes the registered xll add-in is not available, even if we registered it. excel shows an error #NAME. This happens if excel is started in automation mode and is embedded in an outer application.

So I really need your advise if it is possible and how we achieve to register the xll add-in reliable.
What is the advantage using adxregister instead of ExcelApp.RegisterXll?
What is the advantage using ExcelApp.RegisterXll instead of adxregister?
Posted 27 Mar, 2019 02:10:47 Top
Dmitry Kostochko


Add-in Express team


Posts: 2811
Joined: 2004-04-05
Hi Dirk,

I don't think these "large problems" relate to adxregistrator.exe itself. It is the Excel nature. Please see my comments below.

a) We have two add-ins in the list of installed add-ins but have only one product. This is confusing our customers.


You really have 2 Excel extensions: COM add-in and XLL. Excel shows them in the list of installed add-ins. You can set AddinModule.AddinName and ADXXLLModule.AddinName to different values, e.g. "My Company Add-in" and "My Company Functions", probably this will be clearer to your customers.

b) In the following scenario it is not always possible to use adxregister:


As you know, it is impossible to register XLL for every user of a machine. And, as you understand, it is not our limitation. You can try to call the RegisterXll method in your com add-in, this should register your XLL for the current user.

c) sometimes the registered xll add-in is not available, even if we registered it. excel shows an error #NAME. This happens if excel is started in automation mode and is embedded in an outer application.


We have already discussed this issue, as far as I understand you already implemented the workaround - turn the XLL off and then on by using the Installed property.

What is the advantage using adxregister instead of ExcelApp.RegisterXll?


I think you mean using adregistrator.exe during installation, correct? If yes:
- This is a supported way to register XLL for the current user.
- XLL will be unregistered for the current user correctly during uninstallation.

Disadvantage: it is impossible to register XLL for all users of the PC.

What is the advantage using ExcelApp.RegisterXll instead of adxregister?


- By using the RegisterXll method in your COM add-in's code you can register XLL for the current user (of course, if XLL is not registered).

Disadvantage: your XLL will remain in the Inactive Application Add-ins list after uninstalling your solution.
Posted 27 Mar, 2019 05:01:06 Top