Edit this page

Object reference not set to an instance of an object

When you have a RadSpreadsheet control on an ASPX page or an ASCX usercontrol, you may observe the following error:

"Object reference not set to an instance of an object."

The above error indicates that there is one or more of the additional libraries needed by the RadSpreadsheet that is not referenced in the project. Those libraries are:

  • Telerik.Windows.Documents.Core.dll — the main assembly from the Telerik document processing libraries.

  • Telerik.Windows.Zip.dll — needed for working with zipped formats (DOCX, XLSX) and PDF.

  • Telerik.Windows.Documents.Spreadsheet.dll — the main assembly for the spreadsheet processing. It is needed for processing XLSX, CSV, TXT documents.

  • Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.dll — needed for processing XLSX documents.

In order to resolve this issue, you need to include and reference all of the above assemblies. You can find them in the AdditionalLibraries folder in the Telerik® UI for ASP.NET Ajax installation (automated and manual) and in the internal builds archive. They support .NET 4 and .NET 4.5, so depending on the target framework of your project, you need to take the assemblies from the Bin40 or Bin45 folder respectively.