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.

ArgumentOutOfRangeException while using XlsIO with Excel template

Thread ID:

Created:

Updated:

Platform:

Replies:

109860 Jul 8,2013 10:17 AM Jul 18,2013 12:18 AM WPF 3
loading
Tags: XlsIO
Farhan
Asked On July 8, 2013 10:17 AM

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);

Manikandan M [Syncfusion]
Replied On July 11, 2013 11:48 PM

Hi Farhan,

 

Thanks for using Syncfusion products.

 

We are able to reproduce the reported issue “Exception is thrown when applying the template marker” from the given details alone. So could be please update us input file which contains template marker variable and also your scenario to reproduce the issue from our side. So that we could update the solution ASAP. So for the inconvenience caused.

 

Please let us know if you need any clarifications.

 

Thanks,

Manikandan M.


Farhan
Replied On July 15, 2013 02:09 AM

I am attaching the project. Now I am not getting exception, I don't know why but my exported excel file is not getting all the values from code. So I think there's problem with my excel template. Can you please see that ? Compare the output file with the template you will get to know the significant difference.




InvoiceExportDemo_6dd45078.zip

Manikandan M [Syncfusion]
Replied On July 18, 2013 12:18 AM

Hi Farhan,

 

Thanks for your detailed update.

 

On analysis, we found that reported issue is not reproducing in our newer version of Essential studio. So we highly recommend you to upgrade your product to newer version. Please let us know If this helps you.

 

Download link for latest version:

http://www.syncfusion.com/downloads/latest-version

Please let us know if you need any clarifications.

 

Thanks,

Manikandan M.

 


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.

;