The error occurs when I invoke "MasterDocWorkbook.Save();" While if I use "ExcelCopyRangeOptions.All" in place of "ExcelCopyRangeOptions.CopyValueAndSourceFormatting" I get no error at all.
Extra info:
Message = "Value cannot be null.\r\nParameter name: hashNewParentIndexes"
Source = "Syncfusion.XlsIO.Base"
Excel Version: 2016
Source Code: See zip file in attachments
StackTrace:
at Syncfusion.XlsIO.Implementation.XmlSerialization.Excel2007Serializator.SerializeBlankCell(XmlWriter writer, Int32 iRowIndex, Int32 iColumnIndex, Int32 iXFIndex, Dictionary`2 hashNewParentIndexes)
at Syncfusion.XlsIO.Implementation.XmlSerialization.Excel2007Serializator.SerializeCells(XmlWriter writer, RowStorage row, CellRecordCollection cells, Dictionary`2 hashNewParentIndexes, String cellTag)
at Syncfusion.XlsIO.Implementation.XmlSerialization.Excel2007Serializator.SerializeRow(XmlWriter writer, RowStorage row, CellRecordCollection cells, Int32 iRowIndex, Dictionary`2 hashNewParentIndexes, String cellTag, Boolean isSpansNeeded)
at Syncfusion.XlsIO.Implementation.XmlSerialization.Excel2007Serializator.SerializeSheetData(XmlWriter writer, CellRecordCollection cells, Dictionary`2 hashNewParentIndexes, String cellTag, Dictionary`2 additionalAttributes, Boolean isSpansNeeded)
at Syncfusion.XlsIO.Implementation.XmlSerialization.Excel2007Serializator.SerializeSheetDataSet(XmlWriter writer, ExternWorkbookImpl book)
at Syncfusion.XlsIO.Implementation.XmlSerialization.Excel2007Serializator.SerializeExternalLink(XmlWriter writer, ExternWorkbookImpl book)
at Syncfusion.XlsIO.Implementation.XmlSerialization.Excel2007Serializator.SerializeLinkItem(XmlWriter writer, ExternWorkbookImpl book)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SerializeExternalLink(ExternWorkbookImpl externBook)
at Syncfusion.XlsIO.Implementation.XmlSerialization.Excel2007Serializator.SerializeLink(ExternWorkbookImpl externBook, XmlWriter writer, RelationCollection relations)
at Syncfusion.XlsIO.Implementation.XmlSerialization.Excel2007Serializator.SerializeBookExternalLinks(XmlWriter writer, RelationCollection relations)
at Syncfusion.XlsIO.Implementation.XmlSerialization.Excel2007Serializator.SerializeWorkbook(XmlWriter writer, Stream streamStart, Stream streamEnd, List`1 lstBookViews, RelationCollection relations, Dictionary`2 cacheFiles, Stream functionGroups, List`1 lstCustomBookViews)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveWorkbookPart(Dictionary`2 hashNewXFIndexes, Dictionary`2 cacheFiles)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveWorkbook(ExcelSaveType saveAsType)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveDocument(ExcelSaveType saveType)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveDocument(Stream stream, ExcelSaveType saveType)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveDocument(String filename, ExcelSaveType saveType)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.Serialize(String fullName, WorkbookImpl book, ExcelSaveType saveType)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.SaveAs(String FileName, ExcelSaveType saveType, ExcelVersion version)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.SaveAs(String FileName, ExcelSaveType saveType)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.Save()
at UpdateMasterExcelDocument.VerwerkingsInfoCollection.GenerateInfo() in ..\VerwerkingsInfoCollection.cs:line 153
at UpdateMasterExcelDocument.VerwerkingsInfoCollection..ctor() in ..\VerwerkingsInfoCollection.cs:line 26
at UpdateMasterExcelDocument.MainForm.btnProcessDocuments_Click(Object sender, EventArgs e) in ..\MainForm.cs:line 306
Attachment:
UpdateMasterExcelDocument_2b24faa9.zip