Please enable JavaScript to view this site.

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

The following code listing illustrates how to insert an XBRL report into an Excel file and populate the first cell, using VBA.

 

' VBA Example 1:
' Creates a new Solvency II Quaterly Solo Report with form 'S.01.02.01.01' and sets the value of the first cell
Sub Example1()
  Dim addIn As COMAddIn
  Dim automationObject As Object
  Dim Workbook As Object
  Dim tableTree As Object
  Dim tableNode As Object
   
  ' Get the Automation API object
  Set addIn = Application.COMAddIns.Item("Altova.SolvencyIIAddIn")
  Set automationObject = addIn.Object
   
  ' Insert a new Solvency II Quaterly Solo Report
  Set Workbook = automationObject.InsertNewReport("http://eiopa.europa.eu/eu/xbrl/s2md/fws/solvency/solvency2/2019-07-15/mod/qrs.xsd")
   
  Set tableTree = automationObject.GetTableTree(Workbook)
   
  ' Find table tree node for form 'S.01.02.01.01'
  Set tableNode = tableTree.FindTableByRCCode("S.01.02.01.01")
   
  ' Include this table in the filing (this will also create the respective Excel worksheet)
   tableNode.IncludeInFiling = True
   
  ' Get the Data range of this form and set the value of the first cell to "test"
   tableNode.Forms.Item(0).DataRange.Item(1).Value = "test"
End Sub

© 2020 Altova GmbH