Xll Udf for all users

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

Xll Udf for all users
Kiru Marimuthu

Posts: 38
Joined: 2017-07-20

We have an Xll wrapped over Rtd function. We would like to install this for all users. But the com-addin which contains Rtd and Adx task pane been installed for all users but UDF function is missing.

I came across this forum post.
Tried to add the registry entry during addin initialize event.

var xllFolderPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            var XllPath = $"/R "{xllFolderPath}\adxloader.TestAddinExpress.dll"";
            Microsoft.Win32.RegistryKey key;
            key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey($@"SoftwareMicrosoftOffice{ExcelApp.Version}ExcelOptions");
            var regValue = key.GetValue("OPEN");
            if (regValue == null || regValue.ToString() != XllPath)
                key.SetValue("OPEN", XllPath);
                ExcelApp.RegisterXLL(Path.Combine(Path.GetDirectoryName(xllFolderPath), "adxloader.TestAddinExpress.dll"));

So this creates the registry entry for all users if it is missing and the excel-addin appears in the list but still doesn't work unless Excel was restarted.

Another forum post explains about registering Xll dynamically during runtime. But this doesnt seems to work. I have to restart the Excel.

We are looking for options which register the Xll and doesn't need Excel to be restarted.

Posted 23 Oct, 2018 05:03:22 Top
Andrei Smolin

Add-in Express team

Posts: 16197
Joined: 2006-05-11
Hello Kiru,

The form post you refer to contains this fragment from the Add-in Express manual:

Registering an XLL add-in creates a value in the following key:


The value name is OPEN or OPEN{n} where n is 1, if another Excel add-in is registerd, 2 - if there are two other Excel add-ins registered, etc. The value contains a string which is constructed in the following way:
str = "/R " + "" + pathToTheDll + ""

Note that your code doesn't check if OPEN or OPEN{n} value should be created.

I can't say whether this omission is responsible for this issue or not. We have never tested such a scenario.

I wouldn't recommend installing an add-in for all users for these reasons:
- to let an installer update such an add-in, all users must close their instances of the host application; now imagine a terminal server
- sooner or later your customer will require that your add-in works for some, not all users. Switching from per-machine to per-user add-in is more difficult than in the opposite direction.

Kiru Marimuthu writes:
Another forum post explains about registering Xll dynamically during runtime. But this doesnt seems to work. I have to restart the Excel.

That post describes using RegisterXLL, correct? Or, I miss something that you see in it?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 24 Oct, 2018 07:51:42 Top