Syncfusion® ASP.NET MVC Spreadsheet control is a feature-rich Excel-like spreadsheet component for building browser-based spreadsheet experiences. It supports formulas (400+ built-in functions), cell formatting, conditional formatting, data validation, sorting, filtering, charts, images, freeze panes, merge cells, named ranges, multiple sheets, undo/redo, import/export of Excel (XLSX) files, and wrap text. It is ideal for financial modeling, data entry applications, budget planners, and analytics tools built on ASP.NET MVC.
Install
No framework information available.
README
Syncfusion® ASP.NET MVC Spreadsheet Component
A feature-complete Excel-like spreadsheet for creating, editing, and viewing spreadsheet data in a web browser without requiring Microsoft Excel.
Key Features
- File Import/Export: Import and export XLSX, XLS, and CSV files for seamless data exchange
- 400+ Formulas: Comprehensive formula support with formula bar for calculations and analysis
- Cell Formatting: Font styling, alignment, borders, colors, and number formats for professional appearance
- Data Validation: Validate data entry with conditional formatting and cell protection
- Rich Content: Support for charts, images, sparklines, and hyperlinks within cells
- Layout Features: Freeze panes, merge cells, wrap text, and column/row sizing for flexible layouts
- Multiple Sheets: Multiple sheets, sheet protection, and workbook protection for data organization
- Data Operations: Find and replace, sorting, filtering with undo/redo support
- Accessibility: Full keyboard shortcut support and accessibility compliance
- Clipboard Operations: Cut, copy, paste operations with native clipboard integration
Common Setup
These setup steps are required only once for your application, regardless of which Syncfusion components you use.
1. Install Base NuGet Package
Install-Package Syncfusion.AspNetMvc.Spreadsheet
2. Add Namespace Reference
Edit Web.config under the Views folder and add the Syncfusion.EJ2 namespace:
<namespaces>
<add namespace="Syncfusion.EJ2"/>
</namespaces>
3. Add Stylesheet & Script References
In your layout file (~/Views/Shared/_Layout.cshtml), add the following in the <head> section:
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewBag.Title - Syncfusion Application</title>
<!-- Syncfusion ASP.NET MVC controls styles -->
<link rel="stylesheet" href="https://cdn.syncfusion.com/ej2/34.1.31/fluent2.css" />
<!-- Syncfusion ASP.NET MVC controls scripts -->
<script src="https://cdn.syncfusion.com/ej2/34.1.31/dist/ej2.min.js"></script>
</head>
4. Register Script Manager
At the end of the <body> tag in your layout file (~/Views/Shared/_Layout.cshtml):
<body>
@RenderBody()
<!-- Syncfusion ASP.NET MVC Script Manager -->
@Html.EJS().ScriptManager()
</body>
Quick Start
Step 1: Add ASP.NET MVC Spreadsheet control
Add the Syncfusion® ASP.NET MVC Spreadsheet control ~/Views/Home/Index.cshtml page:
@Html.EJS().Spreadsheet("spreadsheet").OpenUrl("Open").SaveUrl("Save").Created("createdHandler").Sheets(sheet =>
{
sheet.Name("Car Sales Report").Ranges(ranges =>
{
ranges.DataSource((IEnumerable<object>)ViewData["DefaultData"]).Add();
}).Rows(row => {
row.Cells(cell =>
{
cell.Value("Customer Name").Add();
cell.Index(3).Value("Payment Mode").Add();
cell.Value("Delivery Date").Add();
}).Add();
row.Index(30).Cells(cell =>
{
cell.Index(4).Value("Total Amount:").Style(new SpreadsheetCellStyle() { FontWeight = FontWeight.Bold, TextAlign = TextAlign.Right }).Add();
cell.Formula("=SUM(F2:F30)").Style(new SpreadsheetCellStyle() { FontWeight = FontWeight.Bold }).Add();
}).Add();
}).Columns(column =>
{
column.Width(180).Add();
column.Width(130).Add();
column.Width(130).Add();
column.Width(180).Add();
column.Width(130).Add();
column.Width(120).Add();
}).Add();
}).Render()
Step 2: Add Controller
public partial class SpreadsheetController : Controller
{
public ActionResult DefaultFunctionalities()
{
List<object> data = new List<object>()
{
new { CustomerName= "Romona Heaslip", Model= "Taurus", Color= "Aquamarine", PaymentMode= "Debit Card", DeliveryDate= "07-11-2015", Amount= "8529.22" },
new { CustomerName= "Clare Batterton", Model= "Sparrow", Color= "Pink", PaymentMode= "Cash On Delivery", DeliveryDate= "07-13-2016", Amount= "17866.19" },
new { CustomerName= "Eamon Traise", Model= "Grand Cherokee", Color= "Blue", PaymentMode= "Net Banking", DeliveryDate= "09-04-2015", Amount= "13853.09" },
new { CustomerName= "Julius Gorner", Model= "GTO", Color= "Aquamarine", PaymentMode= "Credit Card", DeliveryDate= "12-15-2017", Amount= "2338.74" },
new { CustomerName= "Jenna Schoolfield", Model= "LX", Color= "Yellow", PaymentMode= "Credit Card", DeliveryDate= "10-08-2014", Amount= "9578.45" },
new { CustomerName= "Marylynne Harring", Model= "Catera", Color= "Green", PaymentMode= "Cash On Delivery", DeliveryDate= "07-01-2017", Amount= "19141.62" },
new { CustomerName= "Vilhelmina Leipelt", Model= "7 Series", Color= "Goldenrod", PaymentMode= "Credit Card", DeliveryDate= "12-20-2015", Amount= "6543.30" },
new { CustomerName= "Barby Heisler", Model= "Corvette", Color= "Red", PaymentMode= "Credit Card", DeliveryDate= "11-24-2014", Amount= "13035.06" },
new { CustomerName= "Karyn Boik", Model= "Regal", Color= "Indigo", PaymentMode= "Debit Card", DeliveryDate= "05-12-2014", Amount= "18488.80" },
new { CustomerName= "Jeanette Pamplin", Model= "S4", Color= "Fuscia", PaymentMode= "Net Banking", DeliveryDate= "12-30-2014", Amount= "12317.04" },
new { CustomerName= "Cristi Espinos", Model= "TL", Color= "Aquamarine", PaymentMode= "Credit Card", DeliveryDate= "12-18-2013", Amount= "6230.13" },
new { CustomerName= "Issy Humm", Model= "Club Wagon", Color= "Pink", PaymentMode= "Cash On Delivery", DeliveryDate= "02-02-2015", Amount= "9709.49" },
new { CustomerName= "Tuesday Fautly", Model= "V8 Vantage", Color= "Crimson", PaymentMode= "Debit Card", DeliveryDate= "11-19-2014", Amount= "9766.10" },
new { CustomerName= "Rosemaria Thomann", Model= "Caravan", Color= "Violet", PaymentMode= "Net Banking", DeliveryDate= "02-08-2014", Amount= "7685.49" },
new { CustomerName= "Lyell Fuentez", Model= "Bravada", Color= "Violet", PaymentMode= "Debit Card", DeliveryDate= "08-05-2016", Amount= "18012.45" },
new { CustomerName= "Raynell Layne", Model= "Colorado", Color= "Pink", PaymentMode= "Credit Card", DeliveryDate= "05-30-2016", Amount= "2785.49" },
new { CustomerName= "Raye Whines", Model= "4Runner", Color= "Red", PaymentMode= "Debit Card", DeliveryDate= "12-10-2016", Amount= "9967.74" },
new { CustomerName= "Virgina Aharoni", Model= "TSX", Color= "Pink", PaymentMode= "Cash On Delivery", DeliveryDate= "10-23-2014", Amount= "5584.33" },
new { CustomerName= "Peta Cheshir", Model= "Pathfinder", Color= "Red", PaymentMode= "Net Banking", DeliveryDate= "12-24-2015", Amount= "5286.53" },
new { CustomerName= "Jule Urion", Model= "Charger", Color= "Violet", PaymentMode= "Debit Card", DeliveryDate= "11-20-2013", Amount= "13511.91" },
new { CustomerName= "Lew Gilyatt", Model= "Bonneville", Color= "Crimson", PaymentMode= "Credit Card", DeliveryDate= "11-19-2013", Amount= "6498.19" },
new { CustomerName= "Jobey Fortun", Model= "B-Series", Color= "Blue", PaymentMode= "Net Banking", DeliveryDate= "10-30-2014", Amount= "10359.67" },
new { CustomerName= "Blondie Crump", Model= "Voyager", Color= "Turquoise", PaymentMode= "Credit Card", DeliveryDate= "04-06-2018", Amount= "8118.39" },
new { CustomerName= "Florentia Binns", Model= "Grand Prix", Color= "Orange", PaymentMode= "Cash On Delivery", DeliveryDate= "10-13-2016", Amount= "10204.37" },
new { CustomerName= "Jaquelin Galtone", Model= "Sunbird", Color= "Red", PaymentMode= "Net Banking", DeliveryDate= "10-22-2013", Amount= "6528.06" },
new { CustomerName= "Hakeem Easseby", Model= "Mirage", Color= "Crimson", PaymentMode= "Debit Card", DeliveryDate= "09-12-2014", Amount= "5619.25" },
new { CustomerName= "Nickolaus Gidman", Model= "XK", Color= "Orange", PaymentMode= "Debit Card", DeliveryDate= "05-12-2016", Amount= "5091.43" },
new { CustomerName= "Jenine Iglesia", Model= "Accord", Color= "Orange", PaymentMode= "Debit Card", DeliveryDate= "09-03-2018", Amount= "14566.08" },
new { CustomerName= "Fax Witherspoon", Model= "Range Rover Sport", Color= "Orange", PaymentMode= "Credit Card", DeliveryDate= "02-22-2018", Amount= "5284.87" }
};
ViewData["DefaultData"] = data;
return View();
}
public ActionResult Open(OpenRequest openRequest)
{
return Content(Workbook.Open(openRequest));
}
public void Save(SaveSettings saveSettings)
{
if (saveSettings != null && saveSettings.JSONData != null)
{
Workbook.Save(saveSettings);
}
}
}
Run the Application
Press Ctrl+F5 to run the application in your browser.
Documentation
Support
License
This is a commercial product and requires a paid license for possession or use. Review the Syncfusion® EULA
About Syncfusion®
Syncfusion® provides 1600+ UI components and frameworks for web, mobile, and desktop development across multiple platforms:
Web: Blazor | ASP.NET MVC | ASP.NET MVC | JavaScript | Angular | React | Vue
Desktop: WinForms | WPF | WinUI
Learn more at www.syncfusion.com
[email protected] | Toll Free: 1-888-9-DOTNET
Changes from Previous Version
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.