New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
Custom Provider
Updated on Nov 25, 2025
The following article demonstrates how to implement a custom provider for the RadSpreadsheet.
Implementing the Provider
In order to implement a custom provider for the RadSpreadsheet you would need to create a class that inherits the SpreadsheetProviderBase class. The custom class should implement the SaveWorkbook and GetSheets methods, which provide the end points for reading and writing data to the Spreadsheet. The following steps will help you to easily create and implement a custom provider for the RadSpreadsheet.
- Create a class that inherits the SpreadsheetProviderBase class:
C#
using Telerik.Web.UI;
using Telerik.Web.Spreadsheet;
public class SpreadsheetDataBaseProvider : SpreadsheetProviderBase
{
}- In the custom class you should implement the SaveWorkbook and GetSheets methods:
C#
public override void SaveWorkbook(Workbook workbook)
{
...
}
public override List<Worksheet> GetSheets()
{
List<Worksheet> result = new List<Worksheet>();
...
return result;
}- JavaScript keeps the dates as interegers and in the save method, the dates would would be received as integers, not DateTime objects. To convert the integer to a date on the server, the following approach can be used:
C#
public override void SaveWorkbook(Workbook workbook)
{
...
DateTime date = new DateTime(1900, 1, 1);
// dateValue is the Cell's string value parsed as an integer
DateTime dateFromDateValue = date.AddDays(dateValue - 2);
...
}- Provide the RadSpreadsheet control with the newly created custom provider at the Page_Load in the following manner:
C#
protected void Page_Load(object sender, EventArgs e)
{
SpreadsheetDataBaseProvider provider = new SpreadsheetDataBaseProvider();
RadSpreadsheet1.Provider = provider;
}You can investigate the entire setup and test the behavior of the RadSpreadsheet with Custom Database Provider in the Custom Database Provider for RadSpreadsheet article.