Syncfusion.AspNetMvc.Spreadsheet 34.1.31

Prefix Reserved
dotnet add package Syncfusion.AspNetMvc.Spreadsheet --version 34.1.31
                    
NuGet\Install-Package Syncfusion.AspNetMvc.Spreadsheet -Version 34.1.31
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Syncfusion.AspNetMvc.Spreadsheet" Version="34.1.31" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Syncfusion.AspNetMvc.Spreadsheet" Version="34.1.31" />
                    
Directory.Packages.props
<PackageReference Include="Syncfusion.AspNetMvc.Spreadsheet" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Syncfusion.AspNetMvc.Spreadsheet --version 34.1.31
                    
#r "nuget: Syncfusion.AspNetMvc.Spreadsheet, 34.1.31"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Syncfusion.AspNetMvc.Spreadsheet@34.1.31
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Syncfusion.AspNetMvc.Spreadsheet&version=34.1.31
                    
Install as a Cake Addin
#tool nuget:?package=Syncfusion.AspNetMvc.Spreadsheet&version=34.1.31
                    
Install as a Cake Tool

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>
    
    
    <link rel="stylesheet" href="https://cdn.syncfusion.com/ej2/34.1.31/fluent2.css" />
    
    
    <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()
    
    
    @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:  BlazorASP.NET MVCASP.NET MVCJavaScriptAngularReactVue

Mobile:  FlutterMAUIUWP

Desktop:  WinFormsWPFWinUI

Learn more at www.syncfusion.com

sales@syncfusion.com | Toll Free: 1-888-9-DOTNET

Product Compatible and additional computed target framework versions.
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
34.1.31 42 7/14/2026
34.1.30 86 7/9/2026
34.1.29 97 7/6/2026