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

Null Reference trying to access Cell Range

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?

Cheers,

Mike


3 Replies

MC Mike Conway October 17, 2011 09:32 PM UTC

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



MC Mike Conway October 18, 2011 06:03 PM UTC

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.

Mike



SR Sridhar Syncfusion Team October 20, 2011 05:36 PM UTC

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.

Thanks,
Sridhar.S


Loader.
Live Chat Icon For mobile
Up arrow icon