This article explains how to implement nested template marker using C#/VB.NET in XlsIO.
What is a nested template marker?
A is a special marker symbol created in an Excel template that appends multiple records from a data source into a worksheet. This marker automatically maps the column name in the data source and names of the marker fields in the template Excel document and fills the data.
When a data source contains another data source as a member, it is considered as a nested data. This nested data can be imported by template marker in XlsIO by mapping the two data sources into a single data source or object.
To implement nested template marker, you need to follow the below steps.
Steps to implement nested template marker:
1. The template marker in the Excel file needs to be given according to the newly mapped object.
The below screenshot shows the template markers in the input file.
2. Create a template marker processor for the workbook.
3. Add template marker variable using AddVariable(string strName, object variable) method. Here, “list” is the data to be imported and “Result” is the reference to the data.
4.Apply the markers.
The following C#/VB.NET complete code snippet shows how to implement nested template marker.
The below screenshot shows the output of the Excel file generated by the nested template marker in XlsIO.
This page will automatically be redirected to the sign-in page in 10 seconds.