We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to use template marker with collection object?

Platform: WinForms |
Control: XlsIO |
Published Date: February 28, 2018 |
Last Revised Date: February 28, 2018
Tags: xlsio

This article explains how to use template marker with collection object using XlsIO in C#/VB.NET.

How to use template marker with collections?

A template marker 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 an object contains another object collection as a member, then it can be imported by the template marker by detecting the enumerable content in every phase of the collection.


To import data from a collection in a object, you will need to follow the below steps.

Steps to use horizontal argument

  1. Create a workbook template with markers in it. Here, FirmDetails is the marker variable referred to a class object, followed by its properties separated by dot (.).



The below screenshot shows how the markers are applied in workbook template.



  1. Create template marker processor.



  1. Add a variable name that is equal to the class object specified in step 1.



  1. Apply markers.



To know more about template marker with various import options using XlsIO, please refer the documentation.


Download Complete Sample


The following C#/VB.NET complete code snippet shows how to use template marker with collection object.



The below screenshot shows the output document generated using template markers.


2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile