An XLL file is basically a DLL with some special features to make it work with Excel.
See - https://msdn.microsoft.com/en-us/library/office/bb687911.aspx
By creating a DLL which exports xlAutoOpen
, and then renaming the compiled DLL to .xll, we can execute our code in DllMain
when the file is loaded by Excel.
The attached .xll file will open with Excel (by default) when double-clicked. The user will then be presented with a warning. If the warning is clicked through, then our code is executed.