syncfusion-uwp-spreadsheet-editor
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSyncfusion UWP Spreadsheet Editor
Syncfusion UWP Spreadsheet 编辑器
Overview
概述
Build Excel-like spreadsheet applications in UWP using Syncfusion SfSpreadsheet control with full support for workbook operations, formulas, charts, data validation, and ribbon customization.
借助Syncfusion SfSpreadsheet控件在UWP中构建类Excel的表格应用,全面支持工作簿操作、公式、图表、数据验证和功能区自定义。
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
- 工作簿操作:创建/打开/保存Excel文件(XLS、XLSX、XLSM、CSV)、多工作表、冻结窗格、缩放、保护
- 单元格操作:编辑、格式化(字体、颜色、边框、对齐方式)、合并单元格、批注、超链接、书签
- 数据特性:400+兼容Excel的公式、命名区域、数据验证、条件格式化、填充序列
- 高级特性:图表、迷你图、剪贴板操作、撤销/重做、分组/大纲
Quick Start Examples
快速开始示例
Example 1
示例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
用户:"展示如何创建带有数据和公式的表格"
结果:生成用于创建工作簿、设置单元格值和添加公式的C#代码
Example 2
示例2
User: "Add data validation and rules in the spreadsheet control"
Result: C# code generated for spreadsheet control validation and custom rules
用户:"在表格控件中添加数据验证和规则"
结果:生成用于表格控件验证和自定义规则的C#代码
Generate UWP Code — Workflow
生成UWP代码 — 工作流
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"
触发关键词:"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
步骤1:询问用户交付选项
Before showing code, ask:
"How would you like me to provide the solution?
Option 1: Create a new file in skill folder (.codestudio/skills/syncfusion-uwp-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.
展示代码前,请询问:
"您希望我以何种方式提供解决方案?
选项1:在Skill文件夹中创建新文件(.codestudio/skills/syncfusion-uwp-spreadsheet-editor/output/)
选项2:将代码添加到项目中已有的文件(请提供文件路径)
选项3:仅展示代码(不创建/修改任何文件)
请选择选项1、2或3。"⏸️ 等待用户明确选择后再继续。
Step 2: Generate Code from Reference Files
步骤2:从参考文件生成代码
- Read relevant file(s) for requested feature
references/*.md - Build C# and/or XAML code using ONLY snippets from reference files
- Do NOT show code yet, do NOT create files yet
- 读取与请求功能相关的文件
references/*.md - 仅使用参考文件中的代码片段构建C#和/或XAML代码
- 暂不展示代码,也暂不创建文件
Step 3: Handle User Selection
步骤3:处理用户选择
Option 1: Show code → automatically save to (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)
.codestudio/skills/syncfusion-uwp-spreadsheet-editor/output/- For Option 2 only: Before generating code, check if the project has the prerequisites from (Prerequisites and Setup Requirements section). If missing, ask user consent and add them.
references/gettingstarted.md
选项1:展示代码 → 自动保存到(仅Skill文件夹)
选项2:询问文件路径 → 展示代码 → 等待用户明确确认“YES” → 应用代码 → 询问是否构建
选项3:展示代码及摘要和所需程序集 → 完成(不创建/修改任何文件)
.codestudio/skills/syncfusion-uwp-spreadsheet-editor/output/- 仅针对选项2:生成代码前,检查项目是否满足中(前提条件和设置要求部分)的依赖项。若缺失,需征得用户同意后添加。
references/gettingstarted.md
Out-of-Scope Requests
超出范围的请求
When a user asks a question that does NOT match the skill domain (i.e., not related to UWP 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 UWP 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", "UWP" (in context of spreadsheet/Excel).
当用户提出的问题不属于本Skill的领域(即与UWP表格、Excel处理或Syncfusion表格控件无关),请回复:
"无法处理该输入,请更换方式提供输入。"
请勿尝试:
- 生成表格/Excel领域以外的代码
- 提供与表格功能无关的通用UWP指导
- 处理其他Syncfusion控件或无关框架的请求
- 协助处理非表格类功能
仅当用户请求匹配触发关键词时,才激活本Skill及其工作流:"spreadsheet"、"Excel"、"UI"、"code"、"Ribbon"、"UWP"(在表格/Excel相关语境下)。
Code References
代码参考
All templates and feature snippets live in . Each file is a focused snippet the agent combines when generating samples.
references/*.mdFlow: Always start with (Prerequisites and Setup Requirements section), then merge matched feature snippets. If no feature keywords match, return only the basic sample.
references/gettingstarted.md| File | Contents |
|---|---|
| gettingstarted.md | NuGet packages check, XAML setup, namespaces, create/open/save workbook, basic spreadsheet code |
| localization.md | Supported languages, culture settings, localized UI strings, RTL support, number/date/currency formatting, dynamic language switching |
| ribboncustomization.md | Add custom ribbon tabs, add items to existing tabs, remove ribbon tabs and items, ribbon customization patterns |
| worksheetmanagement.md | Insert/delete/rename/hide/unhide sheets, protection (sheets and workbooks), gridlines, headings, zooming |
| editing.md | Enable/disable editing, edit cells programmatically, locking/unlocking cells, editing events, data validation (number, date, text, list, custom formula), hyperlinks |
| selection.md | Enable/disable selection, access current cell, get selected ranges, add/clear selections, move current cell, convert GridRangeInfo and IRange, selection events, keyboard navigation |
| findandreplace.md | Find All, Find Next, Find Conditional Formatting, Find Constants, Find Formulas, Find Data Validation, Replace All, Replace operations |
| formulas.md | Add formulas to cells, 409+ built-in functions (database, date/time, math, text, logical, lookup, statistical, financial, information), named ranges, formula calculation engine |
| customformula.md | Register custom formulas, add custom formulas to FormulaEngine, implement custom formula logic, use custom formulas in cells |
| formatting.md | Cell background color, font formatting, cell borders, cell alignment, text wrapping, merge/unmerge cells, number formatting, built-in styles, format as table, clear formatting |
| rowsandcolumns.md | Insert/delete rows and columns, row height and column width, hide/show rows and columns, freeze/unfreeze panes, auto-fit rows and columns |
| conditionalformatting.md | Highlight cell rules (values, formulas, text, time periods), data bars, color scales, icon sets, comparison operators, format types, time period types |
| interactivefeatures.md | Clipboard operations (cut, copy, paste, paste options in pogrammatically), undo/redo functionality, context menu customization, cell comments |
| outline.md | Group/ungroup rows and columns, expand/collapse groups, outline settings, clear all outlines |
| shapes.md | ⚠️ REQUIRED for graphic elements: Charts (register |
| workingwithsfspreadsheet.md | Access workbook/worksheets, access SpreadsheetGrid, workbook load/unload events, set active sheet, access cells and ranges, set/clear cell values, refresh view, scrolling, formula bar visibility, workbook modification check, suppress alerts, suspend/resume formula calculation, popup management |
所有模板和功能代码片段均存储在中。Agent会在生成示例时组合这些聚焦的代码片段。
references/*.md流程:始终从(前提条件和设置要求部分)开始,然后合并匹配的功能代码片段。若没有匹配的功能关键词,仅返回基础示例。
references/gettingstarted.md| 文件 | 内容 |
|---|---|
| gettingstarted.md | NuGet包检查、XAML设置、命名空间、创建/打开/保存工作簿、基础表格代码 |
| localization.md | 支持的语言、区域设置、本地化UI字符串、RTL支持、数字/日期/货币格式化、动态语言切换 |
| ribboncustomization.md | 添加自定义功能区选项卡、向现有选项卡添加项、移除功能区选项卡和项、功能区自定义模式 |
| worksheetmanagement.md | 插入/删除/重命名/隐藏/取消隐藏工作表、保护(工作表和工作簿)、网格线、标题、缩放 |
| editing.md | 启用/禁用编辑、以编程方式编辑单元格、锁定/解锁单元格、编辑事件、数据验证(数字、日期、文本、列表、自定义公式)、超链接 |
| selection.md | 启用/禁用选择、访问当前单元格、获取选中区域、添加/清除选择、移动当前单元格、转换GridRangeInfo和IRange、选择事件、键盘导航 |
| findandreplace.md | 查找全部、查找下一个、查找条件格式、查找常量、查找公式、查找数据验证、替换全部、替换操作 |
| formulas.md | 向单元格添加公式、409+内置函数(数据库、日期/时间、数学、文本、逻辑、查找、统计、财务、信息)、命名区域、公式计算引擎 |
| customformula.md | 注册自定义公式、向FormulaEngine添加自定义公式、实现自定义公式逻辑、在单元格中使用自定义公式 |
| formatting.md | 单元格背景色、字体格式化、单元格边框、单元格对齐方式、文本换行、合并/取消合并单元格、数字格式化、内置样式、表格格式化、清除格式化 |
| rowsandcolumns.md | 插入/删除行和列、行高和列宽、隐藏/显示行和列、冻结/取消冻结窗格、自动调整行和列 |
| conditionalformatting.md | 突出显示单元格规则(值、公式、文本、时间段)、数据条、色阶、图标集、比较运算符、格式类型、时间段类型 |
| interactivefeatures.md | 剪贴板操作(以编程方式执行剪切、复制、粘贴、粘贴选项)、撤销/重做功能、上下文菜单自定义、单元格批注 |
| outline.md | 分组/取消分组行和列、展开/折叠组、大纲设置、清除所有大纲 |
| shapes.md | **⚠️ 图形元素必备:**图表(注册 |
| workingwithsfspreadsheet.md | 访问工作簿/工作表、访问SpreadsheetGrid、工作簿加载/卸载事件、设置活动工作表、访问单元格和区域、设置/清除单元格值、刷新视图、滚动、公式栏可见性、工作簿修改检查、抑制警报、暂停/恢复公式计算、弹窗管理 |
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
- Generate code exclusively from the Markdown files under
-
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 , respond with:
references/*.mdThat feature is not currently supported by the Syncfusion UWP Spreadsheet component. - Suggest the closest supported features only if they have snippets
- Explicitly list unsupported items and do not synthesize code for them
- If the user requests a feature with no corresponding snippet in
-
Validation Before Write
- Re-validate before writing that all code blocks originate from files
references/*.md - If validation fails, stop and inform the user
- Re-validate before writing that all code blocks originate from
-
仅使用参考代码片段
- 代码生成必须完全来自下的Markdown文件
references/ - 不得自行发明/猜测/包含任何中未提及的属性、事件、API方法、组件名称或参数
references/*.md
- 代码生成必须完全来自
-
未经许可不得修改文件
- 未经用户明确选择和确认,不得在用户工作区中创建或修改任何文件/文件夹
- 未经用户许可,不得创建StackPanel、按钮、文本块、对话框、MessageBox或任何表格以外的UI元素
-
不支持特性的处理
- 如果用户请求的特性在中没有对应的代码片段,请回复:
references/*.md该特性目前不受Syncfusion UWP Spreadsheet组件支持。 - 仅当存在对应代码片段时,才建议最接近的支持特性
- 明确列出不支持的项,不得合成相关代码
- 如果用户请求的特性在
-
写入前验证
- 写入前重新验证所有代码块均来自文件
references/*.md - 若验证失败,停止操作并告知用户
- 写入前重新验证所有代码块均来自