Search results

Getting started with ASP.NET MVC Spreadsheet control

13 May 2021 / 1 minute to read

This section briefly explains about how to include a simple Spreadsheet in your ASP.NET MVC application. You can refer ASP.NET MVC Getting Started documentation page for introduction part of the system requirements and configure the common specifications.

Add Spreadsheet to the project

Spreadsheet component can be rendered by using the EJS().Spreadsheet() tag helper in ASP.NET MVC application. Add the below simple code to your index.cshtml page which is available within the Views/Home folder, to initialize the Spreadsheet.

razor
spreadsheet.cs
Copied to clipboard
@Html.EJS().Spreadsheet("spreadsheet").Render()
Copied to clipboard
public IActionResult Index()
{
    return View();
}

Output be like the below.

Spreadsheet Sample

Run the application

The following example shows a basic Spreadsheet component.

razor
spreadsheet.cs
Copied to clipboard
@Html.EJS().Spreadsheet("spreadsheet").Render()
Copied to clipboard
public IActionResult Index()
{
    return View();
}

See Also