Syncfusion WPF Spreadsheet Editor
Overview
Build Excel-like spreadsheet applications in WPF using Syncfusion SfSpreadsheet control with full support for workbook operations, formulas, charts, data validation, and ribbon customization.
Key Capabilities
- Workbook Operations: Create/open/save Excel files (XLS, XLSX, XLSM, CSV), multiple worksheets, freeze panes, zoom, protection
- Cell Operations: Editing, formatting (fonts, colors, borders, alignment), merge cells, comments, hyperlinks, bookmarks
- Data Features: 400+ Excel-compatible formulas, named ranges, data validation, conditional formatting, fill series
- Advanced Features: Charts, sparklines, clipboard operations, undo/redo, grouping/outlines
- Conversion: Export to PDF, HTML, Image, CSV
Quick Start Examples
Example 1
User: "Show me how to create a spreadsheet with data and formulas"
Result: C# code generated to create workbook, set cell values, and add formulas
Example 2
User: "Add data validation and rules in the spreadsheet control"
Result: C# code generated for spreadsheet control validation and custom rules
Generate WPF Code — Workflow
Trigger keywords: "how to", "add spreadsheet", "code sample", "show me", "example", "snippet", "integrate", "component", "create sample", "code", "sample code", "generate code", "implement", "add to project", "configure spreadsheet"
Step 1: Ask User for Delivery Option
Before showing code, ask:
"How would you like me to provide the solution?
Option 1: Create a new file in skill folder (.codestudio/skills/wpf-spreadsheet-editor/output/)
Option 2: Add code to an existing file in your project (you provide the file path)
Option 3: Just show the code (no files created/modified)
Please select Option 1, 2, or 3."
⏸️ WAIT for explicit user selection before proceeding.
Step 2: Generate Code from Reference Files
- Read relevant
references/*.md file(s) for requested feature
- Build C# and/or XAML code using ONLY snippets from reference files
- Do NOT show code yet, do NOT create files yet
Step 3: Handle User Selection
Option 1: Show code → automatically save to .codestudio/skills/wpf-spreadsheet-editor/output/ (skill folder only)
Option 2: Ask for file path → show code → wait for explicit YES confirmation → apply code → ask to build
Option 3: Show code with summary and required assemblies → done (no files created/modified)
- For Option 2 only: Before generating code, check if the project has the prerequisites from
references/getting-started.md (Prerequisites and Setup Requirements section). If missing, ask user consent and add them.
Out-of-Scope Requests
When a user asks a question that does NOT match the skill domain (i.e., not related to WPF Spreadsheet, Excel processing, or Syncfusion spreadsheet control), respond with:
"Unable to process the input. Please provide the input in a different way."
Do NOT attempt to:
- Generate code outside the spreadsheet/Excel domain
- Provide general WPF guidance unrelated to spreadsheet functionality
- Process requests for other Syncfusion controls or unrelated frameworks
- Assist with non-spreadsheet features
ONLY activate this skill and its workflows when the user's request matches trigger keywords: "spreadsheet", "Excel", "UI", "code", "Ribbon", "WPF" (in context of spreadsheet/Excel).
Code References
All templates and feature snippets live in references/*.md. Each file is a focused snippet the agent combines when generating samples.
Flow: Always start with references/getting-started.md (Prerequisites and Setup Requirements section), then merge matched feature snippets. If no feature keywords match, return only the basic sample.
| File |
Contents |
| getting-started.md |
Assemblies, XAML setup, create/open/save workbook, import from datatable and export to datatable |
| localization.md |
Localization and language support in spreadsheet |
| ribbon.md |
Built-in ribbon overview and integration |
| ribbon-customization.md |
Add/remove ribbon tabs and items, cancel ribbon commands |
| worksheet-management.md |
Insert sheet/delete sheet/rename sheet/ hide sheets, gridlines, headings, zoom, events |
| editing-and-selection.md |
Cell editing, cut/copy/paste, keyboard interaction |
| selection.md |
Cell selection modes, select ranges, select rows/columns |
| find-and-replace.md |
Find All, Find Next, Find Conditional Formatting, Find Constants, Find Formulas, Find Data Validation, Replace All, and Replace operations |
| formulas.md |
400+ Excel-compatible formulas, formula bar, multi-threaded calculation, name ranges |
| name-manager.md |
Create, edit, and manage named ranges |
| cell-comments.md |
Create, edit, and manage cell comments and notes |
| cell-formatting.md |
set Text values , numbers values , dates values , borders, fonts, fill colors, alignment, font styles, wrap text, build in styles, format as table, clear formatting |
| resizing-and-hiding.md |
Insert/Delete, Hide/unhide rows and columns, set row height and column width |
| sorting-and-filtering.md |
Sorting and filtering data, apply filters, custom sort orders, filter by values and criteria |
| conditional-formatting.md |
Data bars, icon sets, color scales, rule-based formatting |
| data-validation.md |
Input restrictions, error alerts, list and cross-sheet validation |
| freeze-panes.md |
Freeze rows and columns for easy navigation and scrolling |
| clipboard-operations.md |
Cut, copy, paste with paste-special options |
| charts-pictures-textboxes.md |
Import and display charts, images, and textboxes |
| outlines.md |
Group/ungroup rows and columns, expand/collapse outline levels |
| sparklines.md |
Import line, column, and win/loss sparklines |
| merge-cells.md |
Merge and unmerge cells |
| workbook-worksheet-protection.md |
Password-protect worksheets and workbook structure |
| conversion.md |
Export to PDF, HTML, image, and CSV; printing spreadsheet |
| fill-series.md |
Auto-fill cells with series values and patterns |
| floating-cells.md |
Work with floating cells and textboxes |
| hyperlinks-and-bookmarks.md |
Create and manage hyperlinks and bookmarks |
| supported-file-types.md |
Supported file formats and import/export options |
| undo-redo.md |
Undo and redo operations in spreadsheet |
| zooming.md |
Zoom in/out and adjust view levels |
Rules
Use Only Reference Snippets
- Generate code exclusively from the Markdown files under `references/
- Do not invent/guess/include any properties, events, API methods, component names, or parameters not present in
references/*.md
NO FILE MODIFICATIONS WITHOUT PERMISSION
- Never create or modify files/folders in user workspace without explicit user selection and confirmation.
- Cannot create StackPanel, buttons, textblocks, dialogs, ,MessageBox or any UI elements beyond the Spreadsheet without user permission.
Unsupported Feature Handling
- If the user requests a feature with no corresponding snippet in
references/*.md, respond with:
That feature is not currently supported by the Syncfusion WPF Spreadsheet component.
- Suggest the closest supported features only if they have snippets
- Explicitly list unsupported items and do not synthesize code for them
Validation Before Write
- Re-validate before writing that all code blocks originate from
references/*.md files
- If validation fails, stop and inform the user
1---2name: syncfusion-wpf-spreadsheet-editor3description: Use this skill for WPF Application needing Excel-like UI using the Syncfusion Spreadsheet Component. Trigger for creating, viewing, editing Excel (.xlsx, .xls) files; using formulas, filtering, sorting, or cell formatting. Also trigger when users reference spreadsheet files ("open xlsx", "load Excel file", "add Syncfusion spreadsheet"). Do NOT trigger for standalone file processing without UI components.4---56# Syncfusion WPF Spreadsheet Editor78## Overview910Build Excel-like spreadsheet applications in WPF using Syncfusion SfSpreadsheet control with full support for workbook operations, formulas, charts, data validation, and ribbon customization.1112## Key Capabilities1314- **Workbook Operations:** Create/open/save Excel files (XLS, XLSX, XLSM, CSV), multiple worksheets, freeze panes, zoom, protection15- **Cell Operations:** Editing, formatting (fonts, colors, borders, alignment), merge cells, comments, hyperlinks, bookmarks16- **Data Features:** 400+ Excel-compatible formulas, named ranges, data validation, conditional formatting, fill series17- **Advanced Features:** Charts, sparklines, clipboard operations, undo/redo, grouping/outlines18- **Conversion:** Export to PDF, HTML, Image, CSV192021## Quick Start Examples2223### Example 124**User:** "Show me how to create a spreadsheet with data and formulas"2526**Result:** C# code generated to create workbook, set cell values, and add formulas2728### Example 229**User:** "Add data validation and rules in the spreadsheet control"3031**Result:** C# code generated for spreadsheet control validation and custom rules3233---3435## Generate WPF Code — Workflow3637**Trigger keywords:** "how to", "add spreadsheet", "code sample", "show me", "example", "snippet", "integrate", "component", "create sample", "code", "sample code", "generate code", "implement", "add to project", "configure spreadsheet"3839### Step 1: Ask User for Delivery Option4041Before showing code, ask:42```43"How would you like me to provide the solution?4445Option 1: Create a new file in skill folder (.codestudio/skills/wpf-spreadsheet-editor/output/)46Option 2: Add code to an existing file in your project (you provide the file path)47Option 3: Just show the code (no files created/modified)4849Please select Option 1, 2, or 3."50```5152**⏸️ WAIT for explicit user selection before proceeding.**5354### Step 2: Generate Code from Reference Files5556- Read relevant `references/*.md` file(s) for requested feature57- Build C# and/or XAML code using ONLY snippets from reference files58- Do NOT show code yet, do NOT create files yet5960### Step 3: Handle User Selection6162**Option 1:** Show code → automatically save to `.codestudio/skills/wpf-spreadsheet-editor/output/` (skill folder only)63**Option 2:** Ask for file path → show code → wait for explicit YES confirmation → apply code → ask to build64**Option 3:** Show code with summary and required assemblies → done (no files created/modified)6566 - **For Option 2 only:** Before generating code, check if the project has the prerequisites from `references/getting-started.md` (Prerequisites and Setup Requirements section). If missing, ask user consent and add them.6768---6970## Out-of-Scope Requests71When a user asks a question that does **NOT** match the skill domain (i.e., not related to WPF Spreadsheet, Excel processing, or Syncfusion spreadsheet control), respond with:7273**"Unable to process the input. Please provide the input in a different way."**7475**Do NOT attempt to:**76- Generate code outside the spreadsheet/Excel domain77- Provide general WPF guidance unrelated to spreadsheet functionality78- Process requests for other Syncfusion controls or unrelated frameworks79- Assist with non-spreadsheet features8081**ONLY activate this skill and its workflows when the user's request matches trigger keywords:** "spreadsheet", "Excel", "UI", "code", "Ribbon", "WPF" (in context of spreadsheet/Excel).8283---8485## Code References8687All templates and feature snippets live in `references/*.md`. Each file is a focused snippet the agent combines when generating samples.88 89Flow: Always start with `references/getting-started.md` (Prerequisites and Setup Requirements section), then merge matched feature snippets. If no feature keywords match, return only the basic sample.9091| File | Contents |92|---|---|93| **getting-started.md** | Assemblies, XAML setup, create/open/save workbook, import from datatable and export to datatable |94| **localization.md** | Localization and language support in spreadsheet |95| **ribbon.md** | Built-in ribbon overview and integration |96| **ribbon-customization.md** | Add/remove ribbon tabs and items, cancel ribbon commands |97| **worksheet-management.md** | Insert sheet/delete sheet/rename sheet/ hide sheets, gridlines, headings, zoom, events |98| **editing-and-selection.md** | Cell editing, cut/copy/paste, keyboard interaction |99| **selection.md** | Cell selection modes, select ranges, select rows/columns |100| **find-and-replace.md** | Find All, Find Next, Find Conditional Formatting, Find Constants, Find Formulas, Find Data Validation, Replace All, and Replace operations |101| **formulas.md** | 400+ Excel-compatible formulas, formula bar, multi-threaded calculation, name ranges | To add formulas into cell | To add or define named ranges, edit and remove named ranges | ExcelLikeComputation | Custom Formula|102| **name-manager.md** | Create, edit, and manage named ranges |103| **cell-comments.md** | Create, edit, and manage cell comments and notes | Cell Context menu | TabItem Context Menu | Customize the Cell Context Menu and TabItemContext Menu104| **cell-formatting.md** | set Text values , numbers values , dates values , borders, fonts, fill colors, alignment, font styles, wrap text, build in styles, format as table, clear formatting | sample data |105| **resizing-and-hiding.md** | Insert/Delete, Hide/unhide rows and columns, set row height and column width |106| **sorting-and-filtering.md** | Sorting and filtering data, apply filters, custom sort orders, filter by values and criteria |107| **conditional-formatting.md** | Data bars, icon sets, color scales, rule-based formatting |108| **data-validation.md** | Input restrictions, error alerts, list and cross-sheet validation |109| **freeze-panes.md** | Freeze rows and columns for easy navigation and scrolling |110| **clipboard-operations.md** | Cut, copy, paste with paste-special options |111| **charts-pictures-textboxes.md** | Import and display charts, images, and textboxes | Select Shapes | Access the Selected Shapes | Clear Selected Shapes | Import Chart Excel File |112| **outlines.md** | Group/ungroup rows and columns, expand/collapse outline levels |113| **sparklines.md** | Import line, column, and win/loss sparklines | Import Excel file with Sparklines |114| **merge-cells.md** | Merge and unmerge cells |115| **workbook-worksheet-protection.md** | Password-protect worksheets and workbook structure |116| **conversion.md** | Export to PDF, HTML, image, and CSV; printing spreadsheet |117| **fill-series.md** | Auto-fill cells with series values and patterns |118| **floating-cells.md** | Work with floating cells and textboxes |119| **hyperlinks-and-bookmarks.md** | Create and manage hyperlinks and bookmarks |120| **supported-file-types.md** | Supported file formats and import/export options |121| **undo-redo.md** | Undo and redo operations in spreadsheet |122| **zooming.md** | Zoom in/out and adjust view levels |123124---125## Rules1261271. **Use Only Reference Snippets**128 - Generate code **exclusively from** the Markdown files under `references/129 - **Do not invent/guess/include** any properties, events, API methods, component names, or parameters not present in `references/*.md`1301312. **NO FILE MODIFICATIONS WITHOUT PERMISSION**132 - Never create or modify files/folders in user workspace without explicit user selection and confirmation.133 - Cannot create StackPanel, buttons, textblocks, dialogs, ,MessageBox or any UI elements beyond the Spreadsheet without user permission.1341353. **Unsupported Feature Handling**136 - If the user requests a feature with no corresponding snippet in `references/*.md`, respond with:137 `That feature is not currently supported by the Syncfusion WPF Spreadsheet component.`138 - Suggest the closest supported features **only if** they have snippets139 - **Explicitly list** unsupported items and **do not synthesize code** for them1401414. **Validation Before Write**142 - Re-validate before writing that **all code blocks** originate from `references/*.md` files143 - If validation fails, stop and inform the user