Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
Loading an Excel Template
posted

I am getting a "System.NullReferenceException: Object reference not set to an instance of an object." error when trying to load this specific Excel file (XmRChartPIR.xlsm).  this excel template has a number of macros, buttons and charts.

I have been able to successfully load other files (.xlsm, .xlt, .xls) that are less complicated.  Is there something I can do to load the Excel file I am having problems with?

 

Code: 

Dim FileString As String = "...\Excel\XmRChartPIR.xlsm"

Dim exWB As New

Infragistics.Documents.Excel.Workbook()

exWB = Infragistics.Documents.Excel.Workbook.Load(FileString)

 

 

StackTrace:

NullReferenceException: Object reference not set to an instance of an object.]
Infragistics.Documents.Excel.Serialization.Excel2007.SharedElements.Drawing.BlipElement.Load(Excel2007WorkbookSerializationManager manager, ExcelXmlElement element, String value, Boolean& isReaderOnNextNode) +539
   Infragistics.Documents.Excel.Serialization.Excel2007.XmlElementBase.LoadChildElements(Excel2007WorkbookSerializationManager manager, ExcelXmlNode node, ExcelXmlDocument document, XmlReader reader, ElementDataCache elementCache, List`1 elementCacheCollection, BeforeLoadElementCallback beforeLoadElementHandler, AfterLoadElementCallback afterLoadElementHandler, Boolean& isReaderOnNextNode) +565
   Infragistics.Documents.Excel.Serialization.Excel2007.XmlElementBase.LoadChildElements(Excel2007WorkbookSerializationManager manager, ExcelXmlNode node, ExcelXmlDocument document, XmlReader reader, ElementDataCache elementCache, List`1 elementCacheCollection, BeforeLoadElementCallback beforeLoadElementHandler, AfterLoadElementCallback afterLoadElementHandler, Boolean& isReaderOnNextNode) +632

 

Parents Reply Children