For a complete example of how to create an Excel® add-in using the Library Compiler app, see Create Excel Add-In from MATLAB.
As an alternative to using the Library Compiler, you can use the command line to
create your deployable executable. Use compiler.build.excelAddIn or the mcc function.