https://excel-dna.net/docs/guides-basic/Intellisense
I get this error on startup:
Initialization [Error] DnaLibrary AutoOpen Error : TargetInvocationException - Exception has been thrown by the target of an invocation.
I am using the below code. If I uncomment the call to Install inside AutoOpen, then the addin loads and I can use AddThem function (without intellisense of course)
Using latest Office 365 and below packages. Any ideas how to debug?
<PackageReference Include="ExcelDna.Addin" Version="1.6.0" />
<PackageReference Include="ExcelDna.Registration" Version="1.6.0" />
<PackageReference Include="ExcelDna.Intellisense" Version="1.6.0" />
using ExcelDna.Integration;
using ExcelDna.IntelliSense;
public class IntelliSenseAddIn : IExcelAddIn
{
public void AutoOpen()
{
IntelliSenseServer.Install();
}
public void AutoClose()
{
IntelliSenseServer.Uninstall();
}
[ExcelFunction(Description = "A useful test function that adds two numbers, and returns the sum.")]
public static double AddThem(
[ExcelArgument(Name = "Augend", Description = "is the first number, to which will be added")]
double v1,
[ExcelArgument(Name = "Addend", Description = "is the second number that will be added")]
double v2)
{
return v1 + v2;
}
}