Please enable JavaScript to view this site.

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

The following code listing illustrates how to convert an XBRL report to an Excel file, using the C# API.

 

// Converts a Solvency II XBRL report to an Excel document.
using Excel = Microsoft.Office.Interop.Excel;
namespace ConsoleApp1
{
  class Program
  {
    static void Main(string[] args)
    {
        var app = new Excel.Application();
        try
        {
          app.DisplayAlerts = false;
 
          var wb = (Excel._Workbook)(app.Workbooks.Add());
 
          // Get the Automation API object
          dynamic addIn = app.COMAddIns.Item("Altova.SolvencyIIAddIn");
          dynamic automationObject = addIn.Object;
 
          // Import Solvency II report solvencyii_example.xbrl
          automationObject.ImportXBRL(@"C:\test\solvencyii_example.xbrl");
 
          // Save as xlsx
          wb.SaveAs(@"C:\test\solvencyii_example.xlsx");
          wb.Close();
        }
        finally
        {
          app.DisplayAlerts = true;
          app.Quit();
        }
    }
  }
}

© 2020 Altova GmbH