Altova Solvency II XBRL add-in for Excel, ver. 2021 Enterprise Edition

Accessing the API

Home Prev Top Next

You can access programmatically the add-in's COM API in one of the following ways:


from within Excel, by using Visual Basic for Applications (see also

from your custom program, by using the Office Interop API from any .NET language.


The main interface is the IAutomationAPI interface. The following code listing illustrates how to create a new instance of the automation object in VBA.


Dim automationObject As Object
Set automationObject = Application.COMAddIns.Item("Altova.SolvencyIIAddIn").Object


Accessing the COM API from a .NET project

To access the COM API from a Visual Studio .NET project, add a reference to the Microsoft Office Object Library (office.dll) and Microsoft.Office.Interop.Excel assemblies:


1.In Solution Explorer, right-click your project's name and then click Add Reference. The Add Reference dialog box appears.

2.On the Assemblies page, select office and Microsoft.Office.Interop.Excel from the component list, and click OK.


If you do not see the assemblies above:


1.Make sure that you have installed Microsoft Office and that you have selected the .NET Programmability Support feature for Excel, for example:


2.Run the Visual Studio setup and make sure that you choose Office/SharePoint development workload (or the Microsoft Office Developer Tools, if applicable).


For more information about accessing Office interop assemblies from .NET projects, see


After adding the assembly references, you can create a new add-in instance as shown below.


// Make sure that your project references the following two assemblies:
//  * Microsoft.Office.InterOp.Excel
//  * Microsoft Office Object Library (office.dll)

var app = new Microsoft.Office.Interop.Excel.Application();
dynamic automationObject = app.COMAddIns.Item("Altova.SolvencyIIAddIn").Object;

© 2020 Altova GmbH