XLL project does not actually create an XLL?

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

XLL project does not actually create an XLL?
I need to create a real XLL file 
Androulla Pavlou




Posts: 21
Joined: 2016-05-25
I'm still a newbied on this site. I've done a walkthrough of a regular COM dll that is universal to most office Apps and universal to most office versions. All well and good. Next I walked through creating an XLL and although everything workeded without error. I'm looking to create an actual XLL file, not a COM dll that behaves like an XLL. Am I missing something? Can ADX help me create a real XLL?
Posted 31 May, 2016 20:28:22 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
Hello Androulla,

An XLL is a native code DLL. Add-in Express creates an assembly containing a managed XLL add-in. To load the managed assembly in an unmanaged application such as Excel, you need to initialize CLR, create an AppDomain, load your assembly into the Appdomain, etc. These tasks are performed by adxloader.dll which is a true native-code XLL.


Andrei Smolin
Add-in Express Team Leader
Posted 01 Jun, 2016 05:05:57 Top
Androulla Pavlou




Posts: 21
Joined: 2016-05-25
Andrei:

Thanks for your response. I am primarily a developer in VBA, so much of what you said is very foreign to me.

I was hoping I could use ADX to create an actual XLL file. My understanding of XLL files is that, unlike a DLL, you can actually load an XLL file by simply double-clicking on it. It will launch Excel and its functionality is made available to Excel. Or, alternatively (but also simple for end-users), you can add an XLL file the add-in Wizard.

From what i can understand an ADX "XLL" is not really an XLL at all. it's simply a COM dll that behaves very much like an XLL. Problem is, it does not INSTALL like a real XLL.

If all this is true, I just need to know. If I am overlooking something and there actually is a way to create a REAL XLL with ADX, please let me know . I just want to be sure I'm not missing something.

There are many customers out there who are very wary of installers or their IT departments won't let them install anything, but they are allowed to load XLL files.

Androulla
Posted 01 Jun, 2016 15:10:28 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
Hello Androulla,

Androulla Pavlou writes:
My understanding of XLL files is that, unlike a DLL, you can actually load an XLL file by simply double-clicking on it.


This scenario isn't supported.

Androulla Pavlou writes:
Or, alternatively (but also simple for end-users), you can add an XLL file the add-in Wizard.


This scenario *is* supported.

Androulla Pavlou writes:
it's simply a COM dll that behaves very much like an XLL.


The loader DLL implements many COM interfaces and exports many non-COM functions. Depending on the way the loader is loaded by an Office application it appears to be a COM add-in, XLL, RTD server, etc.

Androulla Pavlou writes:
Problem is, it does not INSTALL like a real XLL.


You develop a managed XLL add-in, not an XLL file. The resulting XLL add-in is a *folder* containing these files:
- 32 bit and 64 bit loader
- loader manifest
- AddinExpress.MSO.2005.dll, an Add-in Express assembly
- your add-in assembly
- your assembly's dependency assemblies (optional)
- a .config file (optional)

When you register the XLL add-in or load it using the Add-in Manager dialog, this creates required registry entries, Excel loads the XLL add-in, and users can use the functions it provides. The only thing differing from a real XLL is the file extension of the loader file.

If you need to create an XLL file, you'll have to use Excel SDK and unmanaged C++ instead of using Add-in Express.

Androulla Pavlou writes:
There are many customers out there who are very wary of installers or their IT departments won't let them install anything, but they are allowed to load XLL files.


Loading an Add-in Express based XLL add-in using the Add-in Manager dialog is supported. Make sure you provide *all* the files required for your XLL add-in and browse for a loader file of the same bitness as Excel's.

I suppose I might miss the meaning of "real XLL". If so, please provide more details.


Andrei Smolin
Add-in Express Team Leader
Posted 02 Jun, 2016 04:37:42 Top
Androulla Pavlou




Posts: 21
Joined: 2016-05-25
Andrei:

Thanks so much for your responses.

At this point I believe I am clear on the fact that ADX does not help you to create a file with an XLL file extension and that you refer to the file as an XLL "add-in".

I also think I understand that you can create an installer package for the XLL add-in. I have tested this successfully on several machine configurations. The files I am working with are:
MyXLLAddin3Setup(1.0.0).msi
setup.exe

I am not completely clear on the dependency between these two files and/or which I would provide to a customer, but for now I'm not worrying about that. What I do know is that they install just fine on my machines.

I also think I understand from your message that it is *possible* to load (install?) the XLL add-in from Excel (IE going to File > Options > Add-ins > Excel Add-ins. However, this is where my understanding stops. In this install dialog, you have an option to "Browse" to a file you wish to load. However, I'm not able to use either of the two files listed above, so I'm assuming I need to create some other kind of file that can be loaded.

You say " Make sure you provide *all* the files required for your XLL add-in and browse for a loader file of the same bitness as Excel's. " My apologies, but I don't know which files I need for my XLL add-in and I don't know what a loader is and I don't know what "bitness" is. Do you have any tutorials on all of this? Can this all be accomplished with ADX, or is this outside the scope of ADX?

Thanks
Posted 02 Jun, 2016 15:30:11 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
Hello Androulla,

Androulla Pavlou writes:
I am not completely clear on the dependency between these two files and/or which I would provide to a customer


These files constitute the installer of your XLL add-in. If no prerequisites are required, you can provide the .MSI file only. Otherwise, you need to provide both of the files; the user needs to start setup.exe in this case.

To register an Add-in Express based XLL add-in using the Add-in Manager dialog (= without installing the XLL add-in), make sure there exists a folder containing all the files listed in section Files to Deploy, see the PDF file in the folder {Add-in Express}\Docs on your development PC. Note that these files are also installed by the installer of your add-in.

In the Add-in Manager dialog, you click the Browse button, navigate to the folder containing the add-in's files and choose adxloader.dll (for a 32bit Excel) or adxloader64.dll (for a 64bit Excel). When Excel loads the loader and invokes a method the loader implements, this triggers a chain of actions that ends with your add-in assembly loaded and user-defined functions registered.

If you have any questions or need more information, don't hesitate to ask me.


Andrei Smolin
Add-in Express Team Leader
Posted 03 Jun, 2016 05:06:37 Top