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. Image for the cookie policy date
close icon

SFDataGrid - Excel Export Exception

if i´m trying to export my Grid to Excel like in the example:
DataGridExcelExportingControllerexcelExport=newDataGridExcelExportingController();
varexcelEngine=excelExport.ExportToExcel(this.dataGrid);
then i`m getting following exeption:
Message : ErrorMessage :Specified argument was out of the range of valid values.
Parameter name: firstRow or lastRow.

How can i fix this?

3 Replies

AN Ashok N Syncfusion Team August 31, 2016 06:31 AM UTC

Hi Eray, 
 
Thank you for contacting Syncfusion Support. 
 
We have checked your query. We were unable to reproduce the reported “Exporting” issue from our side. Exporting to excel will working properly. We have attached the working copy of our sample and you can download the same from the below link for your reference,    
If you still experience the reported issue from your side, please modify the sample based on your requirement and revert us to proceed further.   
 
Regards, 
Ashok 



EC Eray Cakal February 7, 2017 09:58 AM UTC

i can reproduce this error even with the updated syncfusion libraries [14.4451.0.20]. The error occurs when initializing the DataGridExcelExportingController like:
DataGridExcelExportingController excelExport = new DataGridExcelExportingController();
error : Native linking failed. Please review the build log. 

build log:
1>  ld: don't know how to convert instruction ef09937e referencing _mono_create_corlib_exception_1.island to thumb in 'Syncfusion_Calculate_CalcEngine_ComputeDevsq_string' from /Users/./Library/Caches/Xamarin/mtbs/builds/PPU_PIA/./obj/iPhone/Debug/mtouch-cache/Syncfusion.XlsIO.Portable.dll.armv7.o for architecture armv7
1>  clang: error: linker command failed with exit code 1 (use -v to see invocation)
1>  
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(696,3): error : Native linking error: don't know how to convert instruction ef09937e referencing _mono_create_corlib_exception_1.island to thumb in 'Syncfusion_Calculate_CalcEngine_ComputeDevsq_string' from /Users/./Library/Caches/Xamarin/mtbs/builds/PPU_PIA/./obj/iPhone/Debug/mtouch-cache/Syncfusion.XlsIO.Portable.dll.armv7.o for architecture armv7

  • All libraries referenced like in your tutorial
  • SDK version: 10.2
  • Linker behavior: Link SDK assemblies only
  • generic value type sharing enabled



AN Ashok N Syncfusion Team February 8, 2017 09:28 AM UTC

Hi Eray,  
 
We have checked the reported problem and when using Syncfusion.XlsIO.Portable class library in iOS application, the following settings must be done to execute in iOS devices.

Visual Studio: 
In Visual Studio, we can only execute in release mode for iOS device. By setting the link behavior to Link SDK assemblies only.

Xamarin Studio (Recommended): 
 
1.     Link behavior: Link SDK assemblies only (otherwise classes you need in Syncfusion.XlsIO.Portable.dll are linked away).  
   
  
  
2.     Enable debugging: Unchecked (this is to create a smaller binary, since adding debug information makes it somewhat bigger).  
   
  
Applying these settings will execute the application properly in iOS device.  
You might face the following issues, if the above-mentioned build options are missed out.  
·         You might get "Native linking error" while compiling.  
·         You might face runtime Exception ("System.TypeInitializationException").  
   
Regards, 
Ashok  
 


Loader.
Live Chat Icon For mobile
Up arrow icon