Welcome to the WinForms feedback portal. We’re happy you’re here! If you have feedback on how to improve the WinForms, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

2
Votes

The following code :

_data = File.ReadAllBytes(dialog.FileName);
_workbook = _engine.Excel.Workbooks.Open(new MemoryStream(_data));

Throws the following error with the attached spreadsheet:
System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=Syncfusion.XlsIO.Base
  StackTrace:
   at Syncfusion.XlsIO.Implementation.XmlReaders.Shapes.TextBoxShapeParser.ParseParagraphRun(XmlReader reader, RichTextString textArea, Excel2007Parser parser, ITextBox textBox, BulletImpl bullet)
   at Syncfusion.XlsIO.Implementation.XmlReaders.Shapes.TextBoxShapeParser.ParseParagraphs(XmlReader reader, ITextBox textBox, Excel2007Parser parser)
   at Syncfusion.XlsIO.Implementation.XmlReaders.Shapes.TextBoxShapeParser.ParseRichText(XmlReader reader, Excel2007Parser parser, ITextBox textBox)
   at Syncfusion.XlsIO.Implementation.XmlReaders.Shapes.TextBoxShapeParser.ParseTextBox(ITextBox textBox, XmlReader reader, Excel2007Parser parser, List`1 lstRelationIds)
   at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.CreateShape(XmlReader reader, WorksheetBaseImpl sheet, MemoryStream& data, String drawingsPath, List`1 lstRelationIds)
   at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseTwoCellAnchor(XmlReader reader, WorksheetBaseImpl sheet, String drawingsPath, List`1 lstRelationIds, Dictionary`2 dictItemsToRemove, Boolean isChartShape)
   at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseDrawings(XmlReader reader, WorksheetBaseImpl sheet, String drawingsPath, List`1 lstRelationIds, Dictionary`2 dictItemsToRemove, Boolean isChartShape)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.WorksheetDataHolder.ParseDrawings(WorksheetBaseImpl sheet, Relation drawingRelation, Dictionary`2 dictItemsToRemove, Boolean isChartShape)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.WorksheetDataHolder.ParseDrawings(WorksheetBaseImpl sheet, String relationId, Dictionary`2 dictItemsToRemove)
   at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseDrawings(XmlReader reader, WorksheetBaseImpl sheet, Dictionary`2 dictItemsToRemove)
   at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseAfterSheetData(XmlReader reader, WorksheetImpl sheet, MemoryStream& streamCF, String strParentPath, Dictionary`2 dictItemsToRemove)
   at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseSheet(XmlReader reader, WorksheetImpl sheet, String strParentPath, MemoryStream& streamStart, MemoryStream& streamCF, List`1 arrStyles, Dictionary`2 dictItemsToRemove, Dictionary`2 dictUpdatedSSTIndexes)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.WorksheetDataHolder.ParseWorksheetData(WorksheetImpl sheet, Dictionary`2 dictUpdateSSTIndexes, Boolean parseOnDemand)
   at Syncfusion.XlsIO.Implementation.WorksheetImpl.ParseData(Dictionary`2 dictUpdatedSSTIndexes)
   at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseWorksheets(Dictionary`2 dictUpdatedSSTIndexes, Boolean parseOnDemand)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.ParseWorkbook(List`1& themeColors, Boolean parseOnDemand)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.ParseDocument(List`1& themeColors, Boolean parseOnDemand)
   at Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseExcel2007Stream(Stream stream, String password, Boolean parseOnDemand)
   at Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseStream(Stream stream, String password, ExcelVersion version, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, Stream stream, ExcelParseOptions options, ExcelVersion version)
   at Syncfusion.XlsIO.Implementation.ApplicationImpl.CreateWorkbook(Object parent, Stream stream, ExcelVersion version, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream, ExcelVersion version, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream, ExcelOpenType openType)
   at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream)