Hi, I am having some problems while exporting data to excel. I think I have problems in excel template. So first of all I want to know how can I create template for excel, so I can place values there. I want to do similar thing which is in sample app. I tried to replicate that excel template but it didn't work and threw exception. Exception details are given below.
Exception :
System.ArgumentOutOfRangeException was unhandled by user code
HResult=-2146233086
Message=Can't find property
Parameter name: strText
Source=Syncfusion.XlsIO.WinRT
ParamName=strText
StackTrace:
at Syncfusion.XlsIO.Implementation.TemplateMarkers.TemplateMarkersImpl.GetNextValue(Object value, String& strText, String& newNumberFormat,
Type& newType)
at Syncfusion.XlsIO.Implementation.TemplateMarkers.TemplateMarkersImpl.SetSimpleValue(Object value, String strText, IWorksheet sheet,
IMigrantRange migrantRange, IList`1 arrMarkerCells, IList lstArguments, MarkerOptionsImpl options, RangeBuilder builder, UnknownVariableAction
action, String numberFormat, Type valueType)
at Syncfusion.XlsIO.Implementation.TemplateMarkers.TemplateMarkersImpl.SetArrayValue(IList value, String strText, IWorksheet sheet,
IMigrantRange migrantRange, IList`1 arrMarkerCells, IList lstArguments, MarkerOptionsImpl options, RangeBuilder builder, UnknownVariableAction
action, VariableTypeAction variableTypeAction)
at Syncfusion.XlsIO.Implementation.TemplateMarkers.TemplateMarkersImpl.SetUnknownVariable(Object value, String strText, IWorksheet sheet,
IMigrantRange migrantRange, IList`1 arrMarkerCells, IList lstArguments, MarkerOptionsImpl options, RangeBuilder builder, UnknownVariableAction
action, VariableTypeAction variableTypeAction)
at Syncfusion.XlsIO.Implementation.TemplateMarkers.TemplateMarkersImpl.SetVariable(String strVariable, String strText, IWorksheet sheet,
IMigrantRange migrantRange, IList`1 arrMarkerCells, IList lstArguments, MarkerOptionsImpl options, RangeBuilder builder, UnknownVariableAction
action)
at Syncfusion.XlsIO.Implementation.TemplateMarkers.TemplateMarkersImpl.ApplyMarker(IWorksheet sheet, IList`1 arrCells, Int32 i, IMigrantRange
migrantRange, UnknownVariableAction action)
at Syncfusion.XlsIO.Implementation.TemplateMarkers.TemplateMarkersImpl.ApplyMarkers(IWorksheet sheet, List`1 arrLabels, UnknownVariableAction
action)
at Syncfusion.XlsIO.Implementation.TemplateMarkers.TemplateMarkersImpl.ApplyMarkers(IWorkbook book, UnknownVariableAction action)
at Syncfusion.XlsIO.Implementation.TemplateMarkers.TemplateMarkersImpl.ApplyMarkers(UnknownVariableAction action)
at InvoiceExportDemo.ExportToExcel.<GenerateReport>d__0.MoveNext() in d:\Projects\InvoiceExportDemo\InvoiceExportDemo\HelperClass
\ExportToExcel.cs:line 29
line : marker.ApplyMarkers(UnknownVariableAction.Skip);