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.

Null Reference trying to access Cell Range

Thread ID:





101340 Oct 17,2011 11:50 AM Oct 20,2011 01:36 PM ASP.NET Web Forms (Classic) 3
Tags: XlsIO
Mike Conway
Asked On October 17, 2011 11:50 AM

HI there,

I am using Essential Studio and have run into a quirky issue.

Seemingly randomly, when trying to access a range of cells, one cell actually, the syncfusion module throws an exception after being able to access that row in a previous line of code. The column is well within the limits of the length and the row is too.

The exact range is never the same and sometimes it works fine. This is all with the same data.

Does anyone have any thoughts or advice?



Mike Conway
Replied On October 17, 2011 05:32 PM

the issue has been resolved we suspect. it was due to the application we are developing using multithreading. i suspect that due to this and as n grew larger the timings began to step on each other's feet between the multiple worksheets processed at the same time.


Mike Conway
Replied On October 18, 2011 02:03 PM

OK, turns out this was not the issue after all. We changed the process to work synchronously and we are still having this issue of the random null reference exceptions being thrown by the Range property of the the IWorksheet.


Sridhar [Syncfusion]
Replied On October 20, 2011 01:36 PM

Hi Mike,

Thank you for using Syncfusion products.

In XlsIO, We are not support with multi threading process.
can you please make sure the following while working with threading process.

Use single instance of Excel engine and Workbook to run at a time.

And use th excel engine object as global.

Can you please let us know the particular process which the error is thrown so that we are able to analyze furhter and update you with the details for the same. If possible, please revert back to us with the sample code for the same.

Please let us know if you require any further clarifications.



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.