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

Somtimes System.NullReferenceException occurs.

Hi, I'm using XlsIO-silverlight whose version is 10.204.0.75. Sometimes When this control read an excel file, System.NullReferenceException occurs. Below is an exception message.

System.ApplicationException: System.Exception: BatchGeneralViewModel.UploadExcel ---> System.NullReferenceException: [Arg_NullReferenceException] 인수: 디버깅 리소스 문자열을 사용할 없습니다. 종종 키와 인수가 문제를 진단할 있는 충분한 정보를 제공합니다. http://go.microsoft.com/fwlink/?linkid=106663&Version=5.0.10411.00&File=mscorlib.dll&Key=Arg_NullReferenceException 참조하십시오. 위치 Syncfusion.XlsIO.Implementation.WorksheetImpl.GetXFIndex(Int32 iRow, Int32 iColumn) 위치 Syncfusion.XlsIO.Implementation.RangeImpl.get_Item(Int32 row, Int32 column) 위치 Syncfusion.XlsIO.Implementation.WorksheetImpl.GetValueRowCol(Int32 row, Int32 col)

What causes this exception? How can I fix this problem?

3 Replies

SR Sridhar Syncfusion Team August 13, 2012 07:33 AM UTC

Hi Jaeyeol Shin,
 
Thank you for using Syncfusion products.
 
Inorder to reproduce the above reported NullReferenceException we need an excel file which reproduces the issue while opening with XlsIO.Silverlight.Could you please get back to us with the excel file which reproduces the issue so that we are able to proceed further on this.

In Addition to the above reported exception one of our engineer is addressed the issue with the following solution. We have given below the same for your reference.
 
The reported error occurs as the excel engine is not disposed after the workbook operations are completed. Please close / dispose the workbook and Engine once the operations are completed as shown below:
 
workbook.Close();
excelEngine.Dispose();
 
And also the reported issue may occur because the usage of multiple instances of workbook and excel engine in an application. Please use the single instance of an workbook and an excel engine that will
not reproduce the issue where the XlsIO follows the same.
 
Please try the above solution at your side and let us know if these helps you.

Please let me know if you require any further clarifications.
 
Thanks,
Sridhar.S


JS Jaeyeol Shin September 3, 2012 05:29 AM UTC

I did not close workbook and excel engine. Thank you.


SR Sridhar Syncfusion Team September 3, 2012 09:13 AM UTC

Hi Jaeyeol Shin,
 
Thank you so much for the update.
 
Please let us know if you require any further assitance on this.
 
Thanks,
Sridhar.S

Loader.
Live Chat Icon For mobile
Up arrow icon