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.

What causes this error when using ApplyMarkers method?

Thread ID:

Created:

Updated:

Platform:

Replies:

98027 Jan 26,2011 12:19 PM Jan 28,2011 08:39 AM ASP.NET Web Forms (Classic) 3
loading
Tags: XlsIO
SteveTummey
Asked On January 26, 2011 12:19 PM

Hi,

I have a template with various markers in it and AddVariables (both simple strings and datatables) to it via the CreateTemplateMarkersProcessor object but when I try and ApplyMarkers (with ReplaceBlank UnkwownVariableAction option set) I get the following error message:

System.ArgumentOutOfRangeException occurred
Message=Can't find property
Parameter name: strText
ParamName=strText
Source=Syncfusion.XlsIO.Base
StackTrace:
at Syncfusion.XlsIO.Implementation.TemplateMarkers.TemplateMarkersImpl.GetNextValue(Object value, String& strText)
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)
at Syncfusion.XlsIO.Implementation.TemplateMarkers.TemplateMarkersImpl.UnknownProperty(String strProperty, UnknownVariableAction action, String strText, IWorksheet sheet, IMigrantRange migrantRange, IList`1 arrMarkerCells, IList lstArguments, MarkerOptionsImpl options, RangeBuilder builder)
at Syncfusion.XlsIO.Implementation.TemplateMarkers.TemplateMarkersImpl.SetDataTable(DataTable value, String strText, IWorksheet sheet, IMigrantRange migrantRange, IList`1 arrMarkerCells, IList lstArguments, MarkerOptionsImpl options, RangeBuilder builder, UnknownVariableAction action)
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)
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)

What causes this error?




Sridhar [Syncfusion]
Replied On January 27, 2011 01:51 AM

Hi Steve,

Thank you very much for using Syncfusion.

As you have reported in your last update we hope the exception could cause because of importing the set of data from the template which has a named range within it. It would be great if you could able to update us a simplified issue reproducing sample ,so that we can able to sort out the actual cause of the issue and help you out for the same.

Please let us know if you need any clarifications.

Thanks,
Sridhar.



SteveTummey
Replied On January 27, 2011 07:21 AM

Dear Sridhar,

Thanks for the reply.

I've managed to figure out the cause of the error mentioned above.

If you have a set of Datatable.FieldName markers in the template but if the datatable you actually add to the template via the AddVariable method doesn't contain a field that has a marker specified for it in the template you get this error.

Steve




Sridhar [Syncfusion]
Replied On January 28, 2011 08:39 AM

Hi Steve,

Thanks for the update.

By default, the template markers in MSExcel accepts the fieldname with the method addvariable() when applying markers.The markers can't add to the excel if you did not specify the Fieldname of an datatable used.This is the basic functinality and we can't change the format to accept.

Please let us know if you need any clarifications.

Thanks,
Sridhar.






CONFIRMATION

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.

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.

;