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

System.NullReferenceException thrown opening a spreadsheet which was previously opened with no problem.

The repro project I have provided in an attached email to support.
However the simple scenario involves 

opening , closing, re-opening, closing and re-opening spreadsheets which eventually will trigger the following exception opening a excel file which it has previously opened.  (Generally happens on the 4th or 5th date change and hence file open)

  Message=Object reference not set to an instance of an object.
   at Syncfusion.XlsIO.Implementation.WorksheetImpl.GetValue(ICellPositionFormat cell, Boolean preserveOLEDate)
   at Syncfusion.XlsIO.Implementation.RangeImpl.get_Value()
   at Syncfusion.Windows.Forms.Spreadsheet.Helpers.FormulaHelper.ReadCalcChainXMLElements(Spreadsheet sfSpreadsheet, String xml)
   at Syncfusion.Windows.Forms.Spreadsheet.Helpers.FormulaHelper.OpenWorkbookInZipArchive(Stream fileStream, Spreadsheet sfSpreadsheet)
   at Syncfusion.Windows.Forms.Spreadsheet.Spreadsheet.<>c__DisplayClass2f.<StartFormulaThread>b__2e()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Sending a PM email with the repro project.

5 Replies

SP Spotty February 25, 2019 02:47 PM UTC

Ive removed links as the project was shared in a pm so as not to become public available.    Im incredibly disappointed that you then simply posted the link in the forums.

I consider this highly unprofessional.

SP Spotty February 26, 2019 12:42 AM UTC

If you did not download the files from the links provided in the Private Email I can PM with a new location.

MG Mohanraj Gunasekaran Syncfusion Team February 26, 2019 03:55 AM UTC

Hi Spotty, 

We regret for the inconvenience caused. 

We have deleted the our post from this public forum and previously we have downloaded your sample from your provided sample though our support mail. Also. we can reproduce your reported scenario from your provided sample. We suspect that this is a bug. So, we have forwarded this query to our development team. So, we will check and update the details on 27th February 2019. 

Mohanraj G 

MG Mohanraj Gunasekaran Syncfusion Team February 28, 2019 04:24 PM UTC

Hi Spotty,  

We are regret for the this continuous delay. 

We are still analyzing to find cause of the issue due to some complexity. So, we will check and update with more details on tomorrow March 1st 2019. 

Thanks for your patience until then. 

Mohanraj G 

MG Mohanraj Gunasekaran Syncfusion Team March 19, 2019 02:32 PM UTC

Hi Spotty, 

Sorry for the delay 

The issue with "System.NullReferenceException thrown opening a spreadsheet" has been fixed and the patch for this fix can be downloaded from the following location.

Recommended approach - exe will perform automatic configuration
Please find the patch setup from below location:


Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from below location:


Assembly Version:
Installation Directions :
This patch should replace the files “Syncfusion.XlsIO.Base” under the following folder.
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\4.0
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\\precompiledassemblies\\4.0

To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.

Note :
To change how you receive bug fixes, ask your license management portal admin to change your project’s patch delivery mode.


Disclaimer :
Please note that we have created this patch for version specifically to resolve the following issue(s) reported in this/the forum(s). 142864

If you have received other patches for the same version for other products, please apply all patches in the order received.
This fix will be included in our next main release 2019 Volume1.  

Mohanraj G 

Live Chat Icon For mobile
Up arrow icon