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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to update formula for each row using Template Markers

This article explains how to update formula using template markers in XlsIO in C#/VB.NET

 

How to update formula using template markers?

 

The formula is updated when it is copied to another cell. To copy the cells from one cell to another while importing the data using template markers, we can use copyrange argument with the template markers. The argument copyrange specified in template marker copies the specified cells after each cell import.

 

Syntax

 

%<MarkerVariable>.<Property>;copyrange:R[rowIndex]C[columnIndex]

 

To update formula using template markers, you need to follow the below steps.

 

Steps to use update formula using template marker

 

  1. Create a workbook template with markers in it. Here, Employee 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. The cell “E4” contains the formula “D4*12”.

 

                        

 

  1. Create template marker processor.

 

 

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

 

 

  1. Apply markers.

 

 

Download Complete Sample

 

The following C#/VB.NET complete code snippet shows how to update formulas using template markers in XlsIO

 

 

 

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

 

 

Article ID: Published Date: Last Revised Date: Platform: Control:
8523 02/28/2018 02/28/2018 Windows Forms XlsIO
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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