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

Null Reference on XlsIO.AddCopy()

We just updated to of Syncfusion and we started getting a Null Reference Error on our Worksheet.AddCopy calls.  I'm sure it's because we are doing something wrong and it just wasn't causing a problem before.  We do have code that messes around with IName.Delete().  But in the earlier version of XlsIO things ran OK. 

Stack Trace:
Object reference not set to an instance of an object.
   at Syncfusion.XlsIO.Implementation.Collections.WorksheetNamesCollection.FillFrom(WorksheetNamesCollection sourceNames, IDictionary hashNewWorksheetNames, Dictionary`2 dicNewNameIndexes, ExcelNamesMergeOptions option, Dictionary`2 hashExternSheetIndexes)
   at Syncfusion.XlsIO.Implementation.WorksheetImpl.CopyNames(WorksheetImpl basedOn, Dictionary`2 hashNewSheetNames, Dictionary`2 hashNewNameIndexes, Dictionary`2 hashExternSheetIndexes)
   at Syncfusion.XlsIO.Implementation.WorksheetImpl.CopyFrom(WorksheetImpl worksheet, Dictionary`2 hashStyleNames, Dictionary`2 hashWorksheetNames, Dictionary`2 dicFontIndexes, ExcelWorksheetCopyFlags flags, Dictionary`2 hashExtFormatIndexes, Dictionary`2 hashNameIndexes, Dictionary`2 hashExternSheets)
   at Syncfusion.XlsIO.Implementation.Collections.WorksheetsCollection.AddCopy(IWorksheet sheet, ExcelWorksheetCopyFlags flags, Boolean isLocal)
   at Syncfusion.XlsIO.Implementation.Collections.WorksheetsCollection.AddCopy(IWorksheet sheet, ExcelWorksheetCopyFlags flags)
   at Syncfusion.XlsIO.Implementation.Collections.WorksheetsCollection.AddCopy(IWorksheet sheet)

Can anyone point me in the right direction as to what we might be doing wrong to cause XlsIO to Exception when we call AddCopy()?  Thanks

1 Reply

SR Sudha Ramachandran Syncfusion Team November 12, 2014 10:02 AM UTC

Hi James,

Thank you for using Syncfusion products.

A new Direct-Trac incident 131912 has been created for follow-up regarding the reported query. Please refer the mentioned incident and get back to us in that if you need any clarification.


Sudha Ramachandran

Live Chat Icon For mobile
Up arrow icon