Excel data source driver

From XBRLWiki
Jump to navigationJump to search

Description

The Excel Data Source Driver is a configurable generic driver to obtain data from excel files and create XBRL reports inside the automatization framework provided by the XBRL Mapper engine designed by Reporting Standard.

Editors

The installation of Reporting Standard Mapper already installs an Excel plug-in that is able to edit the configuration file described in the next section. Advanced users can take advantage of editing the XML configuration files manually or creating their own editing applications.

Configuration file

The configuration file is provided during the driver declaration inside the instance document template file. See XBRL Template File#Definition_of_data_sources for more information. The driver class is com.ihr.xbrl.mapper.source.ExcelDataSource

Sample Excel driver data source declaration: <syntaxhighlight lang="xml">

 <datasources>
   <source 
     id="source0" 
     class="com.ihr.xbrl.mapper.source.ExcelDataSource" 
     config="Excel-driver-config.xml"/>
 </datasources>

</syntaxhighlight>

The configuration file must be valid according to a very simple XML Schema that has no namespace and that is published in the following official location http://www.reportingstandard.com/schemas/mapper/XBRLDataSourceExcelMapSchema.xsd

Sample configuration file: <syntaxhighlight lang="xml"> <XBRLDataSourceExcelMap

 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation
   ="http://www.reportingstandard.com/schemas/mapper/XBRLDataSourceExcelMapSchema.xsd">
 <map>
   <mapId>ifrs-gp_CostOfSales</mapId>
   <cell>CostsSheet!costofsales</cell>
 </map>
 <map>
   <mapId>ifrs-gp_Revenues</mapId>
   <cell>RevenuesSheet!D1</cell>
 </map>

</XBRLDataSourceExcelMap> </syntaxhighlight>

The example above shows the content of the mapping configuration file. The root element is the XBRLDataSourceExcelMap element whose content is a set of map elements. In turn, a map element is a sequence of two other elements called mapId and cell.

The mapId element content is a string that corresponds to the mapIdentifier string of existing events XBRL Template File#Events in the instance document template.

The cell element content is a cell reference inside the Excel book. It may have two different formats:

  • explicit address to a specific cell using sheetname!Reference where Reference takes the form for a colum letter followed by the row number, or
  • relative address to a specific cell using sheetname!cellname where cellname is an existing named range in the excel file. The named range must point to just one cell.

Navigation

Main Page | XBRLmapper