You can find the primary interop assemblies (PIAs) on NuGet under the package name MSOffice.Object.Library version 15.0. How to Enable the 15.0 Object Library in Excel
In your VBA code, use conditional compilation: Microsoft Excel 15.0 Object Library Download
Scroll down the list until you find . Check the box next to it and click OK . Troubleshooting "Missing" Library Errors You can find the primary interop assemblies (PIAs)