# ASP.NET MVC Spreadsheet Overview

The Telerik UI Spreadsheet HtmlHelper for ASP.NET MVC is a server-side wrapper for the Kendo UI Spreadsheet widget.

The Spreadsheet allows you to edit and visualize tabular data by using cell formatting options, styles, and themes.

* [Demo page for the Spreadsheet HtmlHelper](https://demos.telerik.com/aspnet-mvc/spreadsheet/index)

## Initializing the Spreadsheet

The following example demonstrates how to define the Spreadsheet.

```Razor HtmlHelper
@(Html.Kendo().Spreadsheet()
    .Name("spreadsheet")
    .Sheets(sheets => {
        sheets.Add()
            .Name("Food Order")
            .MergedCells("A1:F1", "C15:E15")
            .Columns(columns =>
            {
                columns.Add().Width(100);
                columns.Add().Width(215);
                columns.Add().Width(115);
                columns.Add().Width(115);
                columns.Add().Width(115);
                columns.Add().Width(155);
            })
            .Rows(rows =>
            {
                rows.Add().Height(50).Cells(cells =>
                {
                    cells.Add()
                        .Value("My Company")
                        .FontSize(25)
                        .Background("rgb(142,196,65)")
                        .TextAlign(SpreadsheetTextAlign.Center)
                        .Color("white");
                });

                rows.Add().Height(25).Cells(cells =>
                {
                    cells.Add()
                        .Value("ID")
                        .Background("rgb(212,223,50)")
                        .TextAlign(SpreadsheetTextAlign.Center);

                    cells.Add()
                        .Value("Product")
                        .Background("rgb(212,223,50)")
                        .TextAlign(SpreadsheetTextAlign.Center);

                    cells.Add()
                        .Value("Quantity")
                        .Background("rgb(212,223,50)")
                        .TextAlign(SpreadsheetTextAlign.Center);

                    cells.Add()
                        .Value("Price")
                        .Background("rgb(212,223,50)")
                        .TextAlign(SpreadsheetTextAlign.Center);

                    cells.Add()
                        .Value("Tax")
                        .Background("rgb(212,223,50)")
                        .TextAlign(SpreadsheetTextAlign.Center);

                    cells.Add()
                        .Value("Amount")
                        .Background("rgb(212,223,50)")
                        .TextAlign(SpreadsheetTextAlign.Center);
                });
            });
        })
)
```

```C# Controller
    public class SpreadsheetController : Controller
    {
        public ActionResult Index()
        {                            
            return View();
        }
    }
```

## Basic Configuration

The following example demonstrates the basic configuration for the Spreadsheet component.

```Razor HtmlHelper
    @(Html.Kendo().Spreadsheet()
        .Name("spreadsheet")
        .Rows(10)
        .Columns(10)
        .Sheetsbar(true)
        .Toolbar(true)
        .HtmlAttributes(new { style = "width:100%" })
        .Toolbar(t => t.Home(true).Data(false).Insert(false))
        .Excel(excel => excel
            .ProxyURL(Url.Action("Index_Save", "Spreadsheet"))
        )
        .Pdf(pdf => pdf
            .ProxyURL(Url.Action("Index_Save", "Spreadsheet"))
        )
    .Sheets(sheets =>
    {
        sheets.Add()
            .Name("Food Order")
            .MergedCells("A1:F1", "C15:E15")
            .Columns(columns =>
            {
                columns.Add().Width(100);
                columns.Add().Width(215);
                columns.Add().Width(115);
                columns.Add().Width(115);
                columns.Add().Width(115);
                columns.Add().Width(155);
            })
            .Rows(rows =>
            {
                rows.Add().Height(50).Cells(cells =>
                {
                    cells.Add()
                        .Value("My Company")
                        .FontSize(25)
                        .Background("rgb(142,196,65)")
                        .TextAlign(SpreadsheetTextAlign.Center)
                        .Color("white");
                });

                rows.Add().Height(25).Cells(cells =>
                {
                    cells.Add()
                        .Value("ID")
                        .Background("rgb(212,223,50)")
                        .TextAlign(SpreadsheetTextAlign.Center);

                    cells.Add()
                        .Value("Product")
                        .Background("rgb(212,223,50)")
                        .TextAlign(SpreadsheetTextAlign.Center);

                    cells.Add()
                        .Value("Quantity")
                        .Background("rgb(212,223,50)")
                        .TextAlign(SpreadsheetTextAlign.Center);

                    cells.Add()
                        .Value("Price")
                        .Background("rgb(212,223,50)")
                        .TextAlign(SpreadsheetTextAlign.Center);

                    cells.Add()
                        .Value("Tax")
                        .Background("rgb(212,223,50)")
                        .TextAlign(SpreadsheetTextAlign.Center);

                    cells.Add()
                        .Value("Amount")
                        .Background("rgb(212,223,50)")
                        .TextAlign(SpreadsheetTextAlign.Center);
                });
            });
    })
    )
```

## Functionality and Features

| Feature                                                                                                                                                           | Description                                                                                                                                                                                                                                                         |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Comments](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/spreadsheet/comments)                                                    | The Spreadsheet allows the user to insert comments within each cell.                                                                                                                                                                                                |
| [Custom functions](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/spreadsheet/custom-functions)                                    | You can customize the behavior of the Spreadsheet with formulas.                                                                                                                                                                                                    |
| [Cell formatting](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/spreadsheet/formatting)                                           | The Spreadsheet supports cell-formatting options such as formatting of strings, text, numbers, dates, and time.                                                                                                                                                     |
| [Images](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/spreadsheet/images)                                                        | The Spreadsheet supports the placing of images in its sheets.                                                                                                                                                                                                       |
| [Import and export of data](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/spreadsheet/import-and-export-data/bind-to-data-source) | The Spreadsheet can consume data from the server-side and then export an Excel file.                                                                                                                                                                                |
| [End user guide](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/spreadsheet/end-user/user-guide)                                   | You can provide ready-made comprehensive guides about the Spreadsheet to your users.                                                                                                                                                                                |
| [Sorting and Filtering](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/spreadsheet/sorting-filtering)                              | The Spreadsheet for ASP.NET Core allows you to set predefined sort and filter settings.                                                                                                                                                                             |
| [Disabled Cells](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/spreadsheet/disabled-cells)                                        | You can control the enabled and disabled state of the cells.                                                                                                                                                                                                        |
| [Validation](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/spreadsheet/validation)                                                | The Spreadsheet allows you to validate if the user-provided input meets the expected requirements.                                                                                                                                                                  |
| [Custom Cell Editors](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/spreadsheet/custom-cell-editors)                              | The component supports custom cell editors that aids users enter correct values with ease.                                                                                                                                                                          |
| [Toolbar](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/spreadsheet/toolbar)                                                      | The Spreadsheet component provides the means to customize its toolbar.                                                                                                                                                                                              |
| [Accessibility](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/spreadsheet/accessibility/overview)                                 | The component is accessible for screen readers, supports WAI-ARIA attributes, and delivers [keyboard shortcuts](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/spreadsheet/accessibility/keyboard-navigation) for faster navigation. |

## Next Steps

* [Getting Started with the Spreadsheet](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/spreadsheet/getting-started)
* [Basic Usage of the Spreadsheet HtmlHelper for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/spreadsheet)

## See Also

* [Server-Side API](https://www.telerik.com/aspnet-mvc/documentation/api/spreadsheet)
* [Knowledge Base Section](https://www.telerik.com/aspnet-mvc/documentation/knowledge-base)
