How to add a reference to add a reference to a dll library in a VBA project in an excel file?
16:29 05 Nov 2025

I need to give users the option to refresh some data from a URL from within an Excel file. Users need to authenticate while accessing that URL, and then they will get the data that they need.

So far, I have been able to accomplish this with a custom Excel file and some macros. Now I am working on automating the file generation from C#, so the first file that is downloaded already includes the data and has the URL for the data refresh process already set in the VBA code.

The missing piece is that I need to add references to "Microsoft Internet Controls" and "Microsoft HTML Object Library" in the generated file for the macros to work, but I have not found a way to get EPPlus to add the references. Any help is appreciated.

c# excel epplus