Loading...
Loading...
Use this skill for ASP.NET MVC apps needing Excel-like UI using the Syncfusion Spreadsheet Component. Trigger for creating, viewing, editing Excel (.xlsx, .xls, .xlsb) and CSV files; embedding spreadsheet editors; data binding from APIs/JSON; using formulas, charts, validation, filtering, or conditional formatting. Also trigger when users reference spreadsheet files ("open xlsx", "load Excel file", "add Syncfusion spreadsheet", "bind data to spreadsheet"). Do NOT trigger for standalone file processing without UI components.
npx skill4agent add syncfusion/spreadsheet-editor-sdk-skills syncfusion-aspnetmvc-spreadsheet-editorxlsxxlsxlsbHomeController.csusing System;
using System.Collections.Generic;
using System.Web.Mvc;
using Syncfusion.EJ2.Spreadsheet;
namespace YourApp.Controllers
{
public class SpreadsheetController : Controller
{
public ActionResult Index()
{
List<object> data = new List<object>()
{
new { Name = "Sample", Value = "Data" }
};
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);
}
}
}
}Index.cshtml@using Syncfusion.EJ2
@using Syncfusion.EJ2.Spreadsheet
<div class="control-section">
@Html.EJS().Spreadsheet("spreadsheet").OpenUrl("Open").SaveUrl("Save").Sheets(sheet =>
{
sheet.Name("Sheet1").Ranges(ranges =>
{
ranges.DataSource((IEnumerable<object>)ViewData["DefaultData"]).Add();
}).Add();
}).Render()
</div>
references/*.md{skill-root}/syncfusion-aspnetmvc-spreadsheet-editor/output/Index.cshtml{skill-root}/syncfusion-aspnetmvc-spreadsheet-editor/output/SpreadsheetController.csreferences/*.md## Rulesreferences/| File | Topic |
|---|---|
| initialization.md | Basic ASP.NET MVC setup and options |
| data-binding.md | Local arrays, JSON, remote (DataManager) |
| formulas.md | Formulas, aggregates, named ranges |
| formatting.md | Cell formatting, borders, wrap text |
| number-formatting.md | Number formatting, decimals, currency, date |
| conditional-formatting.md | Rules, highlights based on conditions |
| data-validation.md | Validation rules, invalid highlights |
| sorting-filtering.md | Sorting, filtering |
| find-replace.md | Find, replace |
| import-export.md | Save (XLSX/CSV/PDF), open, openFromJson |
| charts.md | Insert, edit, delete charts |
| images.md | Insert, modify pictures |
| hyperlink.md | Add, remove hyperlinks |
| comments.md | Threaded comments, replies, resolve threads |
| notes.md | Simple cell notes, sticky visibility, add/edit/delete |
| protection.md | Sheet protection, cell locking, permissions |
| edit-cell.md | startEdit, endEdit, updateCell, edit modes |
| freeze-panes.md | Freeze rows/columns, split panes |
| row-column.md | Insert, delete, resize rows/columns, hide |
| merge-cells.md | Merge, unmerge cells, spanning |
| print.md | Page setup, headers/footers, scaling, margins |
| misc-operations.md | Autofill, clear, sheet management, goTo |
| clipboard.md | Copy, cut, paste with different paste types |
| selection.md | Select cells/ranges, multi-select, getSelectedRange |
| scrolling-virtualization.md | Virtual scrolling, large datasets, performance |
| wrap.md | Text wrapping, multi-line display, row height |
| defined-names.md | Named ranges, define names, refersTo format |
| custom-functions.md | Custom calculation functions, addCustomFunction |
| ribbon-customization.md | Ribbon tabs, toolbar items, file menu customization |
| context-menu.md | Right-click context menu, contextMenuBeforeOpen |
| localization.md | Multi-language, locale, RTL, number/date formats |
| events.md | Event handling, event properties, event patterns |
| autofill.md | Autofill patterns, fill types, series |
https://cdn.syncfusion.com/ej2/{product_version}/dist/ej2.min.jsreferences/*.mdreferences/*.md{skill-root}/syncfusion-aspnetmvc-spreadsheet-editor/output/