How to bind RadSpreadsheet control with file stream

2 posts, 0 answers
  1. Yash
    Yash avatar
    3 posts
    Member since:
    Aug 2013

    Posted 07 Apr Link to this post

    i have excel file saved in SQL database as byte format, now i want to convert this bytes into excel and render it over RadSpreadsheet


    Below is my code by getting exception "Value of type 'Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.XlsxFormatProvider' cannot be converted to 'Telerik.Web.UI.SpreadsheetProviderBase'"

    Please help

    01.Dim fileName As String = "Book1.xlsx"
    02.Dim data() As Byte
    03.Dim cmd As SqlCommand = New SqlCommand("select data from tblFiles") = GetData(cmd)
    06.Dim memStream = New MemoryStream()
    07.Dim binForm = New BinaryFormatter()
    08.memStream.Write(data, 0, data.Length)
    09.memStream.Seek(0, SeekOrigin.Begin)
    11.Dim formatProvider As XlsxFormatProvider = New XlsxFormatProvider()
    13.RadSpreadsheet1.Provider = formatProvider
  2. Anna
    Anna avatar
    124 posts

    Posted 11 Apr Link to this post


    It seems that you are trying to use the ASP.NET RadSpreadsheet with the XlsxFormatProvider. This format provider is designed for the Silverlight / WPF RadSpreadsheet control and the Document Processing Library (DPL). The ASP.NET RadSpreadsheet has a separate format provider which should be used in this case.

    Please, let me know if you have any further questions or comments.

    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top