|119381||Jun 12,2015 09:34 AM||Jun 15,2015 08:09 AM||WPF||1|
Thank you for using Syncfusion products.
XlsIO doen’t support using static variable in template marker. Whereas, this can be achieved by using “copy range” argument in the template, which will copy a value and show it for number of records it contains. To achieve this in template excel file need to allot a column for the variable we like to repeat for each and every record. Add the argument “copyrange:RC” in the previous column of the static value column. Before applying marker need to set the static value in the starting position of the cell, which copy range refers. We have attached the screen shot of the template file, code snippet and simple sample for your reference.
Screen shot of template file:
In column 4 we are going to add the value that should repeat for every record and in the previous column (3rd column) while declaring the property we have added the argument copyrange and refer the range.
ITemplateMarkersProcessor marker = workbook.CreateTemplateMarkersProcessor();
if (this._customers.Count == 0)
this._customers = GetCustomerAsObjects();
worksheet.Range["D2"].Value = Customer.Value;
Please lets us know if you need any clarification.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.