How to Build and Install an Excel Automation Add-In with VB.NET UDFs
Question details
The user needs a repeatable method to build, install, and register an Excel Automation Add-In that exposes VB.NET user-defined functions.

- Product
- Microsoft Excel Automation Add-In with VB.NET
- Device & OS
- Windows
- Scenario
- A developer or IT admin wants to deploy an Excel Automation Add-In with VB.NET UDFs so end users can install it consistently instead of manually registering components.
- Observed behavior
- Without an installer and repeatable deployment process, the add-in may not register correctly, and Excel may not expose or calculate the VB.NET user-defined functions.
Before you begin, confirm that Visual Studio is installed with the .NET desktop development workload, Excel is available for testing, and you have administrator rights on the clean test computer so the installer can register the add-in.
Build and install the Excel Automation Add-In with a Visual Studio setup project
Use this method when you need a repeatable installer that registers the Automation Add-In and includes the VB.NET UDFs for Excel.
Visual Studio setup projects let you register .NET assemblies for COM interop and install them in the correct location. The referenced sample project provides a working template for the Automation Add-In and its VB.NET user-defined functions.
Download the referenced Automation Add-In sample from GitHub, open the .sln file in Visual Studio, and verify the project builds with the VB.NET UDF classes marked for COM registration.
In Solution Explorer, right-click the solution and choose Add > New Project, then select Setup Project and add the primary output of the Automation Add-In project.
In the setup project, select the add-in output, open the Properties window, and set Register to vsdrpCOM so the installer registers the VB.NET functions for Excel.
Choose Build > Build Solution to create the MSI package, then copy it to a clean test computer.
Install the MSI, open Excel, go to File > Options > Add-Ins, confirm the Automation Add-In is registered, and enter the sample UDF formula to verify it calculates correctly.

Use WPS Office as a Free Alternative for Spreadsheet VBA and Macro Workflows
For complex Excel Automation Add-In deployment, Microsoft Excel with Visual Studio is still required. For daily spreadsheet and VBA-compatible work, WPS Office is a free, lightweight Office suite with Excel format compatibility, a familiar ribbon interface, and easier migration for users who do not need COM add-in packaging.

Frequently Asked Questions
Does WPS Office support Excel Automation Add-Ins built with Visual Studio?
WPS Office does not register COM/VSTO automation add-ins the same way as Microsoft Excel. It can open Excel workbooks and work with VBA-enabled content, but for an Excel Automation Add-In built in Visual Studio, use Microsoft Excel.
Can I install a VB.NET Automation Add-In without Visual Studio?
You need a compiled DLL and a setup project or registration tool such as RegAsm. A Visual Studio setup project is the easiest repeatable method because it packages the add-in and registers it during installation.
How do I verify the add-in is registered?
In Excel, go to File > Options > Add-Ins, confirm the Automation Add-In appears, and then enter the sample UDF formula in a worksheet to check that it calculates correctly.
What should I do if the sample formula does not calculate after installation?
Rebuild the solution, check that COM registration is enabled in the setup project, confirm Excel is not in Safe Mode, and test the installer on a clean Windows computer.
Is VB.NET UDF deployment supported on Excel for macOS?
No, Excel Automation Add-Ins built with VB.NET require Windows. For cross-platform solutions, consider JavaScript-based Office Add-ins or a different add-in model.




