aspnetmvc-17113-components-spreadsheet.md
The Spreadsheet is an Excel-inspired extension that allows you to introduce spreadsheet functionality to any ASP.NET MVC application with ease. It provides a rich UI and comprehensive API to create, manage and convert spreadsheet files.
Run Demo: Spreadsheet for ASP.NET MVC
The Spreadsheet extension is implemented by the SpreadsheetExtension class. To access its instance, use the Spreadsheet(SpreadsheetSettings) helper method, which is used to add a Spreadsheet extension to a view. This method’s parameter provides access to the Spreadsheet settings implemented by the SpreadsheetSettings class.
The Spreadsheet ‘s client counterpart is represented by the MVCxClientSpreadsheet object.
@using(Html.BeginForm()) {
@Html.Partial("SpreadsheetPartial")
}
To enable the file downloading and uploading functionality, the Partial View with the extension must be wrapped with the HTML form. Since this functionality is implemented through the UploadControl extension, it’s also necessary to fulfill all the recommendations from the following topic: Upload Control Troubleshooting.
@*The partial view should contain only the extension's code.*@
@Html.DevExpress().Spreadsheet(settings => {
settings.Name = "Spreadsheet";
settings.CallbackRouteValues = new { Controller = "Home", Action = "SpreadsheetPartial" };
}).Open(Server.MapPath("~/App_Data/Documents/MonthlyBudget.xlsx")).GetHtml()
public class HomeController : Controller{
public ActionResult Index(){
return View();
}
public ActionResult SpreadsheetPartial(){
return PartialView("SpreadsheetPartial");
}
}
This document lists the main features of the DevExpress ASP.NET MVC Spreadsheet.
Document ManagementUsers can create, open, modify and save Excel workbooks in a browser. You can perform this operations via the corresponding API.
See demo… | Learn more… | View Example…Ribbon UIA Ribbon UI is automatically added to your spreadsheet application with Spreadsheet. You can also add an external Ribbon extension to use it as the Spreadsheet toolbar.
See demo…Supported File FormatsLoad, convert and save workbooks to popular file formats such as XLS, XLSX, CSV, TXT, and others.
See demo… | Learn more…WorksheetsCreate, rename, move, hide/unhide and delete worksheets in a workbook.
Learn more…Ros and ColumnsInsert, copy, hide and delete rows and columns, and adjust row height and column width.
Learn more…Frozen PanesFreeze panes to make specific columns and rows always visible while scrolling.
See demo: Freeze PanesCells and Cell RangesAdd data of different types, hyperlinks and formulas to cells. Merge and unmerge cells, format, copy and clear cells, and manipulate cell ranges.
See demo… | Learn more…Custom AppearanceCustomize the appearance of cells by specifying different format attributes (font, background, borders, number formats and alignment of cell content).
See demo… | Learn more…Formula Calculation EnginePerform complex calculations using formulas with various functions and cell references, and create shared and array formulas.
See demo: Formulas | See demo: API - Functions in Formulas | Learn more…PicturesInsert, move, change, transform and delete pictures in a worksheet.
See demo…TablesFormat cell ranges as tables to manage and analyze related data.SortingSort data in a range in ascending or descending order.
See demo… | Learn more…FilteringFilter data: use the AutoFilter functionality to arrange large amounts of data by displaying only rows that meet filtering criteria.
See demo… | Learn more…ChartingUse charts to display data in the most appropriate way. A variety of chart types (such as bar charts and line charts) and their subtypes (such as stacked horizontal pyramid charts and 3-D line charts) is supported.
See demo… | Learn more…Data ValidationAn Excel inspired data validation helps prevent end-users from entering wrong values into worksheet cells.
See demo… | Learn more…Mail MergeUse the Mail Merge feature to easily personalize letters, and compose catalogs and master-detail reports of any complexity.
See demo: Mail Merge | See demo: Custom Data Merge | Learn more…Full-Text SearchThe built-in ribbon UI and a specific Find dialog allow end-users to easily locate data within a worksheet.Support for Protected DocumentsWhen opening a document that contains protected elements, the Spreadsheet prevents them from being modified by end-users.
See demo… | Learn more…PrintingThe provided built-in ribbon UI allows end-users to easily customize the opened document for printing and print the entire workbook content.
See demo… | Learn more…Worksheet Print SettingsSpecify print settings: set the paper size, margins, orientation and other settings for worksheet pages.
See demo… | Learn more…Developer APIThe Spreadsheet extension is built on the Spreadsheet Core library, and exposes a comprehensive set of properties, methods, events and commands that enable you to build feature-rich applications.
See demo…